Interface MonitorableService

All Superinterfaces:
Remote
All Known Subinterfaces:
PUServiceBean, Service
All Known Implementing Classes:
org.jini.rio.resources.servicecore.AbstractProxy, PUServiceBeanImpl, PUServiceBeanProxy, org.jini.rio.jsb.ServiceBeanAdapter, org.jini.rio.resources.servicecore.ServiceProvider

public interface MonitorableService extends Remote
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

    Modifier and Type
    Method
    Description
    monitor(long duration)
    Establish a Lease to monitor the reachability of the Service
    void
    Low cost roundtrip check
    void
    startHeartbeat(String[] configArgs)
    Start a heartbeat mechanism to determine the reachability of the Service.
  • Method Details

    • 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
      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
      RemoteException