Rio Project 4.2 API Documentation



org.rioproject.fdh
Class JMXFaultDetectionHandler

java.lang.Object
  extended by org.rioproject.fdh.AbstractFaultDetectionHandler
      extended by 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.

Author:
Dennis Reedy

Nested Class Summary
 
Nested classes/interfaces inherited from class org.rioproject.fdh.AbstractFaultDetectionHandler
AbstractFaultDetectionHandler.ServiceMonitor
 
Field Summary
static String INVOCATION_DELAY_KEY
           
 
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
 
Constructor Summary
JMXFaultDetectionHandler()
           
 
Method Summary
protected  AbstractFaultDetectionHandler.ServiceMonitor getServiceMonitor()
          Get the class which implements the ServiceMonitor
 void monitor()
          Monitor the peer service
 void monitor(Object proxy, ServiceID id, LookupCache lCache)
          Begin monitoring the service
 void setConfiguration(Configuration config)
           
 void setConfiguration(String[] configArgs)
          Set configuration attributes for the FaultDetectionHandler.
 void setInvocationDelay(long invocationDelay)
           
 void setJMXConnection(String jmxConnection)
           
 
Methods inherited from class org.rioproject.fdh.AbstractFaultDetectionHandler
getName, notifyListeners, register, setRetryCount, setRetryTimeout, terminate, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVOCATION_DELAY_KEY

public static final String INVOCATION_DELAY_KEY
See Also:
Constant Field Values
Constructor Detail

JMXFaultDetectionHandler

public JMXFaultDetectionHandler()
Method Detail

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 monitor
id - 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 © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.