|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.fdh.AbstractFaultDetectionHandler
public abstract class AbstractFaultDetectionHandler
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:
FaultDetectionHandler,
FaultDetectionListener| Nested Class Summary | |
|---|---|
static interface |
AbstractFaultDetectionHandler.ServiceMonitor
Defines the semantics of an internal class which will be used in perform service-specific monitoring |
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
AbstractFaultDetectionHandler()
|
|
| Method Summary | |
|---|---|
protected String |
getName(Entry[] attrs)
Get the first Name.name from the attribute collection set |
protected abstract AbstractFaultDetectionHandler.ServiceMonitor |
getServiceMonitor()
Get the class which implements the ServiceMonitor |
void |
monitor(Object proxy,
ServiceID id,
LookupCache lCache)
Begin monitoring the service |
protected void |
notifyListeners()
Notify FaultDetectionListener instances the service has been removed |
void |
register(FaultDetectionListener<ServiceID> listener)
Register a FaultDetectionListener |
void |
setRetryCount(int retryCount)
|
void |
setRetryTimeout(long retryTimeout)
|
void |
terminate()
Terminate the FaultDetectionHandler |
void |
unregister(FaultDetectionListener<ServiceID> listener)
Unregister a FaultDetectionListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.rioproject.fdh.FaultDetectionHandler |
|---|
setConfiguration |
| Field Detail |
|---|
public 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
| Constructor Detail |
|---|
public AbstractFaultDetectionHandler()
| Method Detail |
|---|
public void register(FaultDetectionListener<ServiceID> listener)
FaultDetectionHandler
register in interface FaultDetectionHandler<ServiceID>listener - The FaultDetectionListener to registerFaultDetectionHandler.register(org.rioproject.fdh.FaultDetectionListener) public void unregister(FaultDetectionListener<ServiceID> listener)
FaultDetectionHandler
unregister in interface FaultDetectionHandler<ServiceID>listener - The FaultDetectionListener to unregisterFaultDetectionHandler.unregister(org.rioproject.fdh.FaultDetectionListener)
public void monitor(Object proxy,
ServiceID id,
LookupCache lCache)
throws Exception
FaultDetectionHandler
monitor in interface FaultDetectionHandler<ServiceID>proxy - The service that the FaultDetectionHandler will monitorid - An Object representing a unique service identifier for
the service being monitored.lCache - A LookupCache instance to be used to be notified of service
transition events from a Jini Lookup Service
Exception - If there are abnormal conditions encounteredFaultDetectionHandler.monitor(java.lang.Object, T, net.jini.lookup.LookupCache)
protected abstract AbstractFaultDetectionHandler.ServiceMonitor getServiceMonitor()
throws Exception
Exception - if the ServiceMonitor cannot be createdpublic void terminate()
FaultDetectionHandler
terminate in interface FaultDetectionHandler<ServiceID>FaultDetectionHandler.terminate()protected void notifyListeners()
public void setRetryCount(int retryCount)
public void setRetryTimeout(long retryTimeout)
protected String getName(Entry[] attrs)
attrs - Array of Entry objects
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||