public abstract class AbstractFaultDetectionHandler extends Object implements FaultDetectionHandler
FaultDetectionListener
 registration and notification, a ServiceDiscoveryListener implementation
 Properties that will be common across all classes which extend this class are also provided: FaultDetectionHandler, 
FaultDetectionListener| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
AbstractFaultDetectionHandler.ServiceMonitor
Defines the semantics of an internal class which will be used in perform service-specific
 monitoring 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected Configuration | 
config
A Configuration object 
 | 
protected String[] | 
configArgs
Configuration arguments 
 | 
static int | 
DEFAULT_RETRY_COUNT  | 
static long | 
DEFAULT_RETRY_TIMEOUT  | 
protected Object | 
proxy
Object that can be used to communicate to the service 
 | 
static String | 
RETRY_COUNT_KEY  | 
static String | 
RETRY_TIMEOUT_KEY  | 
protected int | 
retryCount  | 
protected long | 
retryTimeout  | 
protected AbstractFaultDetectionHandler.ServiceMonitor | 
serviceMonitor
Class which provides service monitoring 
 | 
protected boolean | 
terminating
Flag to indicate the utility is terminating 
 | 
| Constructor and Description | 
|---|
AbstractFaultDetectionHandler()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected String | 
getName(Entry[] attrs)
Get the first Name.name from the attribute collection set 
 | 
protected abstract void | 
monitor()
Get the class which implements the ServiceMonitor 
 | 
void | 
monitor(Object proxy,
       ServiceID serviceID)
Begin monitoring the service 
 | 
protected void | 
notifyListeners()
Notify FaultDetectionListener instances the service has been removed 
 | 
void | 
register(FaultDetectionListener listener)
Register a FaultDetectionListener 
 | 
void | 
terminate()
Terminate the FaultDetectionHandler 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConfigurationpublic static final int DEFAULT_RETRY_COUNT
public static final long DEFAULT_RETRY_TIMEOUT
public static final String RETRY_COUNT_KEY
public static final String RETRY_TIMEOUT_KEY
protected Object proxy
protected int retryCount
protected long retryTimeout
protected boolean terminating
protected String[] configArgs
protected Configuration config
protected AbstractFaultDetectionHandler.ServiceMonitor serviceMonitor
public void register(FaultDetectionListener listener)
FaultDetectionHandlerregister in interface FaultDetectionHandlerlistener - The FaultDetectionListener to registerFaultDetectionHandler.register(org.jini.rio.core.FaultDetectionListener)public void monitor(Object proxy, ServiceID serviceID) throws Exception
FaultDetectionHandlermonitor in interface FaultDetectionHandlerproxy - The service that the FaultDetectionHandler will monitor, must not be
                  nullserviceID - An Object representing a unique service identifier for the service being
                  monitored, must not be nullException - If there are abnormal conditions encounteredNullPointerException - if required parameters are nullFaultDetectionHandler.monitor(java.lang.Object, java.lang.Object, net.jini.lookup.LookupCache)protected abstract void monitor()
                         throws Exception
Exceptionpublic void terminate()
FaultDetectionHandlerterminate in interface FaultDetectionHandlerFaultDetectionHandler.terminate()protected void notifyListeners()
Copyright © GigaSpaces.