Class CommandFailbackRegistry
- java.lang.Object
-
- com.networknt.registry.support.FailbackRegistry
-
- com.networknt.registry.support.command.CommandFailbackRegistry
-
- All Implemented Interfaces:
DiscoveryService
,Registry
,RegistryService
public abstract class CommandFailbackRegistry extends FailbackRegistry
-
-
Field Summary
Fields Modifier and Type Field Description protected String
registryClassName
-
Constructor Summary
Constructors Constructor Description CommandFailbackRegistry(URL url)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
available(URL url)
set service status to available, so clients could use itprotected abstract List<URL>
discoverService(URL url)
protected abstract void
doAvailable(URL url)
protected List<URL>
doDiscover(URL url)
protected abstract void
doRegister(URL url)
protected void
doSubscribe(URL url, NotifyListener listener)
protected abstract void
doUnavailable(URL url)
protected abstract void
doUnregister(URL url)
protected void
doUnsubscribe(URL url, NotifyListener listener)
ConcurrentHashMap<URL,CommandServiceManager>
getCommandManagerMap()
Collection<URL>
getRegisteredServiceUrls()
URL
getUrl()
protected void
notify(URL refUrl, NotifyListener listener, List<URL> urls)
protected abstract void
subscribeService(URL url, ServiceListener listener)
void
unavailable(URL url)
set service status to unavailable, client should not discover services of unavailable stateprotected abstract void
unsubscribeService(URL url, ServiceListener listener)
-
Methods inherited from class com.networknt.registry.support.FailbackRegistry
discover, register, subscribe, unregister, unsubscribe
-
-
-
-
Field Detail
-
registryClassName
protected String registryClassName
-
-
Constructor Detail
-
CommandFailbackRegistry
public CommandFailbackRegistry(URL url)
-
-
Method Detail
-
doSubscribe
protected void doSubscribe(URL url, NotifyListener listener)
-
doUnsubscribe
protected void doUnsubscribe(URL url, NotifyListener listener)
-
getCommandManagerMap
public ConcurrentHashMap<URL,CommandServiceManager> getCommandManagerMap()
-
subscribeService
protected abstract void subscribeService(URL url, ServiceListener listener)
-
unsubscribeService
protected abstract void unsubscribeService(URL url, ServiceListener listener)
-
getRegisteredServiceUrls
public Collection<URL> getRegisteredServiceUrls()
- Specified by:
getRegisteredServiceUrls
in interfaceRegistryService
-
available
public void available(URL url)
Description copied from interface:RegistryService
set service status to available, so clients could use it- Specified by:
available
in interfaceRegistryService
- Parameters:
url
- service url to be available, null means all services
-
unavailable
public void unavailable(URL url)
Description copied from interface:RegistryService
set service status to unavailable, client should not discover services of unavailable state- Specified by:
unavailable
in interfaceRegistryService
- Parameters:
url
- service url to be unavailable, null means all services
-
notify
protected void notify(URL refUrl, NotifyListener listener, List<URL> urls)
-
doRegister
protected abstract void doRegister(URL url)
-
doUnregister
protected abstract void doUnregister(URL url)
-
doAvailable
protected abstract void doAvailable(URL url)
-
doUnavailable
protected abstract void doUnavailable(URL url)
-
-