Rio Project 4.2 API Documentation
org.rioproject.fdh
Class JMXFaultDetectionHandler
java.lang.Object
org.rioproject.fdh.AbstractFaultDetectionHandler
org.rioproject.fdh.JMXFaultDetectionHandler
- All Implemented Interfaces:
- FaultDetectionHandler<ServiceID>
public class JMXFaultDetectionHandler
- extends AbstractFaultDetectionHandler
The JMXFaultDetectionHandler is a fault detection handler that uses JMX remote
connectivity to determine if a peer JVM is active. The JMXFaultDetectionHandler
checks the liveness of a MBeanServerConnection that
connects to a peer JVM's JMXConnectorServer.
If the peer JVM has not established a JMXConnectorServer,
the JMXFaultDetectionHandler will only create an event consumer for Lookup
Service TRANSITION_MATCH_NOMATCH transitions.
Configuring JMXFaultDetectionHandler
This implementation of JMXFaultDetectionHandler supports
the following configuration entries; where each configuration entry name is
associated with the component name
org.rioproject.fdh.JMXFaultDetectionHandler.
- invocationDelay
Type:
|
long |
Default:
|
60*1000 (60 seconds) |
Description:
|
The amount of time in milliseconds to wait
between obtaining a MBeanServerConnection to the service being monitored |
- retryCount
Type:
|
int
|
Default:
|
3 |
Description:
|
The number of times to retry connecting to
the service. If the service cannot be reached within the retry count specified
the service will be determined to be unreachable
|
- retryTimeout
Type:
|
long |
Default:
|
1000 (1 second) |
Description:
|
How long to wait between retries (in
milliseconds). This value will be used between retry attempts, waiting the
specified amount of time to retry
|
- Author:
- Dennis Reedy
| Fields inherited from class org.rioproject.fdh.AbstractFaultDetectionHandler |
config, configArgs, DEFAULT_RETRY_COUNT, DEFAULT_RETRY_TIMEOUT, proxy, RETRY_COUNT_KEY, RETRY_TIMEOUT_KEY, retryCount, retryTimeout, serviceMonitor, terminating |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INVOCATION_DELAY_KEY
public static final String INVOCATION_DELAY_KEY
- See Also:
- Constant Field Values
JMXFaultDetectionHandler
public JMXFaultDetectionHandler()
monitor
public void monitor(Object proxy,
ServiceID id,
LookupCache lCache)
throws Exception
- Description copied from interface:
FaultDetectionHandler
- Begin monitoring the service
- Specified by:
monitor in interface FaultDetectionHandler<ServiceID>- Overrides:
monitor in class AbstractFaultDetectionHandler
- Parameters:
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
- Throws:
Exception - If there are abnormal conditions encountered- See Also:
FaultDetectionHandler.monitor(java.lang.Object, T, net.jini.lookup.LookupCache)
monitor
public void monitor()
throws Exception
- Monitor the peer service
- Throws:
IllegalStateException - If the jmxConnection property
has not been set
Exception - If there are problems creating the underlying service
monitor
getServiceMonitor
protected AbstractFaultDetectionHandler.ServiceMonitor getServiceMonitor()
throws Exception
- Description copied from class:
AbstractFaultDetectionHandler
- Get the class which implements the ServiceMonitor
- Specified by:
getServiceMonitor in class AbstractFaultDetectionHandler
- Returns:
- A ServiceMonitor
- Throws:
Exception - if the ServiceMonitor cannot be created
setJMXConnection
public void setJMXConnection(String jmxConnection)
setConfiguration
public void setConfiguration(String[] configArgs)
- Description copied from interface:
FaultDetectionHandler
- Set configuration attributes for the FaultDetectionHandler.
- Parameters:
configArgs - Configuration attributes a FaultDetectionHandler will
use to monitor the service. Values are specific to a concrete instance of
the FaultDetectionHandler
setConfiguration
public void setConfiguration(Configuration config)
throws ConfigurationException
- Throws:
ConfigurationException
setInvocationDelay
public void setInvocationDelay(long invocationDelay)
Copyright © 2006-2011 Rio Project. All Rights Reserved.