Class AbstractFaultDetectionHandler
java.lang.Object
com.j_spaces.core.cluster.startup.AbstractFaultDetectionHandler
- All Implemented Interfaces:
FaultDetectionHandler
- Direct Known Subclasses:
GigaSpacesFaultDetectionHandler
The AbstractFaultDetectionHandler provides a base class which can be extended to provide concrete
FaultDetectionHandler capabilities. The basic infrastructure included in the
AbstractFaultDetectionHandler includes
FaultDetectionListener
registration and notification, a ServiceDiscoveryListener implementation
Properties that will be common across all classes which extend this class are also provided: - retryCount
- retryTimeout
- See Also:
-
FaultDetectionHandlerFaultDetectionListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines the semantics of an internal class which will be used in perform service-specific monitoring -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationA Configuration objectprotected String[]Configuration argumentsstatic final intstatic final longprotected ObjectObject that can be used to communicate to the servicestatic final Stringstatic final Stringprotected intprotected longClass which provides service monitoringprotected booleanFlag to indicate the utility is terminating -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGet the first Name.name from the attribute collection setprotected abstract voidmonitor()Get the class which implements the ServiceMonitorvoidBegin monitoring the serviceprotected voidNotify FaultDetectionListener instances the service has been removedvoidregister(FaultDetectionListener listener) Register a FaultDetectionListenervoidTerminate the FaultDetectionHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.j_spaces.core.cluster.startup.FaultDetectionHandler
setConfiguration
-
Field Details
-
DEFAULT_RETRY_COUNT
public static final int DEFAULT_RETRY_COUNT- See Also:
-
DEFAULT_RETRY_TIMEOUT
public static final long DEFAULT_RETRY_TIMEOUT- See Also:
-
RETRY_COUNT_KEY
- See Also:
-
RETRY_TIMEOUT_KEY
- See Also:
-
proxy
Object that can be used to communicate to the service -
retryCount
protected int retryCount -
retryTimeout
protected long retryTimeout -
terminating
protected boolean terminatingFlag to indicate the utility is terminating -
configArgs
Configuration arguments -
config
A Configuration object -
serviceMonitor
Class which provides service monitoring
-
-
Constructor Details
-
AbstractFaultDetectionHandler
public AbstractFaultDetectionHandler()
-
-
Method Details
-
register
Description copied from interface:FaultDetectionHandlerRegister a FaultDetectionListener- Specified by:
registerin interfaceFaultDetectionHandler- Parameters:
listener- The FaultDetectionListener to register- See Also:
-
FaultDetectionHandler.register(org.jini.rio.core.FaultDetectionListener)
-
monitor
Description copied from interface:FaultDetectionHandlerBegin monitoring the service- Specified by:
monitorin interfaceFaultDetectionHandler- Parameters:
proxy- The service that the FaultDetectionHandler will monitor, must not benullserviceID- An Object representing a unique service identifier for the service being monitored, must not benull- Throws:
Exception- If there are abnormal conditions encounteredNullPointerException- if required parameters arenull- See Also:
-
FaultDetectionHandler.monitor(java.lang.Object, java.lang.Object, net.jini.lookup.LookupCache)
-
monitor
Get the class which implements the ServiceMonitor- Throws:
Exception
-
terminate
public void terminate()Description copied from interface:FaultDetectionHandlerTerminate the FaultDetectionHandler- Specified by:
terminatein interfaceFaultDetectionHandler- See Also:
-
FaultDetectionHandler.terminate()
-
notifyListeners
protected void notifyListeners()Notify FaultDetectionListener instances the service has been removed -
getName
Get the first Name.name from the attribute collection set
-