Rio Project 4.2 API Documentation



org.rioproject.jsb
Interface MonitorableService

All Known Subinterfaces:
Cybernode, ProvisionMonitor, Service
All Known Implementing Classes:
AbstractProxy, BeanAdapter, CybernodeImpl, ProvisionMonitorImpl, ServiceBeanAdapter, ServiceProvider

public interface MonitorableService

A MonitorableService provides the semantics to determine if a service (which implements this interface) is reachable. One of two mechanisms can be used:

  1. Establish a Lease to monitor the reachability of the Service. Using this method a Lease is returned. If the service is unreachable the Lease can not be renewed, a RemoteException will be thrown
  2. The Service will use a heartbeat mechanism to notify the caller of it's existence

Author:
Dennis Reedy

Method Summary
 Lease monitor(long duration)
          Establish a Lease to monitor the reachability of the Service
 void ping()
          Low cost roundtrip check
 void startHeartbeat(String[] configArgs)
          Start a heartbeat mechanism to determine the reachability of the Service.
 

Method Detail

ping

void ping()
          throws RemoteException
Low cost roundtrip check

Throws:
RemoteException - If an error occured during communication with the service

monitor

Lease monitor(long duration)
              throws LeaseDeniedException,
                     RemoteException
Establish a Lease to monitor the reachability of the Service

Parameters:
duration - The duration (in milliseconds) of the requested Lease
Returns:
Lease The Lease to maintain
Throws:
LeaseDeniedException - If requested Lease is denied
RemoteException - If communication errors occur

startHeartbeat

void startHeartbeat(String[] configArgs)
                    throws ConfigurationException,
                           RemoteException
Start a heartbeat mechanism to determine the reachability of the Service. The endpoint to send the heartbeat to will be found by the configuration property
 org.rioproject.fdh.HeartbeatFaultDetectionHandler.heartbeatServer
 

Parameters:
configArgs - Configuration attributes the Service will use to establish a heartbeat mechanism
Throws:
ConfigurationException - If there are errors processing the configuration
RemoteException - If communication errors occur

Copyright © Rio Project.

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