Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.core
Interface MonitorableService

All Known Subinterfaces:
  Cybernode, ProvisionMonitor, Service

All Known Implementing Classes:
  AbstractProxy, BeanAdapter, JMXConnectorService, 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

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.jini.rio.FaultDetectionHandler.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.