Package org.jini.rio.core
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
A MonitorableService provides the semantics to determine if a service (which implements this
interface) is reachable. One of two mechanisms can be used:
- 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
- The Service will use a heartbeat mechanism to notify the caller of it's existence
-
Method Summary
Modifier and TypeMethodDescriptionmonitor(long duration) Establish a Lease to monitor the reachability of the Servicevoidping()Low cost roundtrip checkvoidstartHeartbeat(String[] configArgs) Start a heartbeat mechanism to determine the reachability of the Service.
-
Method Details
-
ping
Low cost roundtrip check- Throws:
RemoteException- If an error occured during communication with the service
-
monitor
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 deniedRemoteException- If communication errors occur
-
startHeartbeat
Start a heartbeat mechanism to determine the reachability of the Service. The endpoint to send the heartbeat to will be found by the configuration propertyorg.jini.rio.FaultDetectionHandler.heartbeatServer
- Parameters:
configArgs- Configuration attributes the Service will use to establish a heartbeat mechanism- Throws:
ConfigurationExceptionRemoteException
-