Class DiscoveryService
java.lang.Object
org.openspaces.admin.internal.discovery.DiscoveryService
- All Implemented Interfaces:
EventListener,DiscoveryListener,ServiceDiscoveryListener
- Author:
- kimchy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddLocator(String locator) voidCalled when one or more lookup service registrars has been discarded.voiddiscovered(DiscoveryEvent disEvent) Called when one or more lookup service registrars has been discovered.voidString[]static StringgetJMXConnection(Entry[] attrs) Get the String value found in the JMXConnection entry, or null if the attribute set does not include a JMXConnectionbooleanvoidWhen the cache receives from one of the managed lookup services, an event signaling the registration of a service of interest for the first time (or for the first time since the service has been discarded), the cache invokes theserviceAddedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that a service of interest has been discovered.voidWhen the cache receives, from a managed lookup service, an event signaling the unique modification of the attributes of a service of interest (across the attribute sets of all references to the service), the cache invokes theserviceChangedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that the state of a service of interest has changed.voidWhen the cache receives, from a managed lookup service, an event signaling the removal of a service of interest from the last such lookup service with which it was registered, the cache invokes theserviceRemovedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that a service of interest has been discarded.voidsetDiscoveryServices(Class... services) voidstart()voidstop()toString()toString(boolean verbose)
-
Constructor Details
-
DiscoveryService
-
-
Method Details
-
setDiscoveryServices
-
addGroup
-
addLocator
-
discoverUnmanagedSpaces
public void discoverUnmanagedSpaces() -
start
public void start() -
stop
public void stop() -
discovered
Description copied from interface:DiscoveryListenerCalled when one or more lookup service registrars has been discovered. The method should return quickly; e.g., it should not make remote calls.- Specified by:
discoveredin interfaceDiscoveryListener- Parameters:
disEvent- the event that describes the discovered registrars
-
discarded
Description copied from interface:DiscoveryListenerCalled when one or more lookup service registrars has been discarded. The method should return quickly; e.g., it should not make remote calls.- Specified by:
discardedin interfaceDiscoveryListener- Parameters:
e- the event that describes the discarded registrars
-
serviceAdded
Description copied from interface:ServiceDiscoveryListenerWhen the cache receives from one of the managed lookup services, an event signaling the registration of a service of interest for the first time (or for the first time since the service has been discarded), the cache invokes theserviceAddedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that a service of interest has been discovered.- Specified by:
serviceAddedin interfaceServiceDiscoveryListener- Parameters:
event- an instance ofServiceDiscoveryEventcontaining references to the service item corresponding to the event, including representations of the service's state both before and after the event.
-
getJMXConnection
Get the String value found in the JMXConnection entry, or null if the attribute set does not include a JMXConnection -
serviceRemoved
Description copied from interface:ServiceDiscoveryListenerWhen the cache receives, from a managed lookup service, an event signaling the removal of a service of interest from the last such lookup service with which it was registered, the cache invokes theserviceRemovedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that a service of interest has been discarded.- Specified by:
serviceRemovedin interfaceServiceDiscoveryListener- Parameters:
event- aServiceDiscoveryEventobject containing references to the service item corresponding to the event, including representations of the service's state both before and after the event.
-
serviceChanged
Description copied from interface:ServiceDiscoveryListenerWhen the cache receives, from a managed lookup service, an event signaling the unique modification of the attributes of a service of interest (across the attribute sets of all references to the service), the cache invokes theserviceChangedmethod on all instances ofServiceDiscoveryListenerthat are registered with the cache; doing so notifies the entity that the state of a service of interest has changed.- Specified by:
serviceChangedin interfaceServiceDiscoveryListener- Parameters:
event- aServiceDiscoveryEventobject containing references to the service item corresponding to the event, including representations of the service's state both before and after the event.
-
getGroups
-
getLocators
-
isDynamicLocatorsEnabled
public boolean isDynamicLocatorsEnabled() -
toString
-
toString
-