public abstract class AbstractServiceDiscovery extends Object implements ServiceDiscovery
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY| Constructor and Description |
|---|
AbstractServiceDiscovery() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doRegister(ServiceInstance serviceInstance)
It should be implement in kinds of service discovers.
|
abstract void |
doUpdate(ServiceInstance serviceInstance)
It should be implement in kinds of service discovers.
|
ServiceInstance |
getLocalInstance() |
void |
register(ServiceInstance serviceInstance)
Registers an instance of
ServiceInstance. |
void |
update(ServiceInstance serviceInstance)
Updates the registered
ServiceInstance. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddServiceInstancesChangedListener, destroy, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, dispatchServiceInstancesChangedEvent, getDefaultPageSize, getInstances, getInstances, getInstances, getInstances, getServices, getUrl, initialize, removeServiceInstancesChangedListener, toString, unregistercompareTo, getPrioritypublic ServiceInstance getLocalInstance()
getLocalInstance in interface ServiceDiscoverypublic final void register(ServiceInstance serviceInstance) throws RuntimeException
ServiceDiscoveryServiceInstance.register in interface ServiceDiscoveryserviceInstance - an instance of ServiceInstance to be registeredRuntimeException - if failedpublic abstract void doRegister(ServiceInstance serviceInstance)
public final void update(ServiceInstance serviceInstance) throws RuntimeException
ServiceDiscoveryServiceInstance.update in interface ServiceDiscoveryserviceInstance - the registered ServiceInstanceRuntimeException - if failedpublic abstract void doUpdate(ServiceInstance serviceInstance)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.