|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.resources.servicecore.AbstractProxy
public abstract class AbstractProxy
Defines an abstract class that supplies basic referent UUID and serialization behavior for Service proxies.
| Field Summary | |
|---|---|
protected Remote |
server
The server |
protected Uuid |
uuid
The unique identifier for this proxy |
| Constructor Summary | |
|---|---|
AbstractProxy(Remote server,
Uuid uuid)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
WatchDataSource[] |
fetch()
Returns an array of all WatchDataSource instances |
WatchDataSource |
fetch(String id)
Returns an array of WatchDataSource instances that match the input id. |
Object |
getAdmin()
|
Uuid |
getReferentUuid()
|
int |
hashCode()
Proxies for servers with the same uuid have the same hash code. |
Lease |
monitor(long duration)
Establish a Lease to monitor the reachability of the Service |
void |
ping()
Low cost roundtrip check |
EventRegistration |
register(EventDescriptor descriptor,
RemoteEventListener listener,
MarshalledObject handback,
long duration)
The register method creates a leased EventRegistration for the EventDescriptor
type passed in based on the requested lease duration. |
void |
startHeartbeat(String[] configArgs)
Start a heartbeat mechanism to determine the reachability of the Service. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Remote server
protected final Uuid uuid
| Constructor Detail |
|---|
public AbstractProxy(Remote server,
Uuid uuid)
| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
public void ping()
throws RemoteException
MonitorableService
ping in interface MonitorableServiceRemoteException - If an error occured during communication with the
serviceMonitorableService.ping()
public Lease monitor(long duration)
throws LeaseDeniedException,
RemoteException
MonitorableService
monitor in interface MonitorableServiceduration - The duration (in milliseconds) of the requested Lease
LeaseDeniedException - If requested Lease is denied
RemoteException - If communication errors occurMonitorableService.monitor(long)
public void startHeartbeat(String[] configArgs)
throws ConfigurationException,
RemoteException
MonitorableServiceorg.rioproject.fdh.HeartbeatFaultDetectionHandler.heartbeatServer
startHeartbeat in interface MonitorableServiceconfigArgs - Configuration attributes the Service will use to
establish a heartbeat mechanism
ConfigurationException - If there are errors processing the
configuration
RemoteException - If communication errors occurMonitorableService.startHeartbeat(java.lang.String[])
public EventRegistration register(EventDescriptor descriptor,
RemoteEventListener listener,
MarshalledObject handback,
long duration)
throws LeaseDeniedException,
UnknownEventException,
RemoteException
EventProducerEventRegistration for the EventDescriptor
type passed in based on the requested lease duration. The implied
semantics of notification are dependant on
EventHandler specializations.
register in interface EventProducerdescriptor - The EventDescriptor to registerlistener - A RemoteEventListenerhandback - A MarshalledObject referencing a handback object to be
used with Event notificationduration - Requested EventRegistration lease duration
LeaseDeniedException - if the duration parameter is not accepted
UnknownEventException - if the service does not produce events described
by the EventDescriptor
RemoteException - if communication errors occurEventProducer.register(org.rioproject.event.EventDescriptor, net.jini.core.event.RemoteEventListener, java.rmi.MarshalledObject, long)
public WatchDataSource[] fetch()
throws RemoteException
Watchable
fetch in interface WatchableRemoteException - If communication errors happenWatchable.fetch()
public WatchDataSource fetch(String id)
throws RemoteException
Watchable
fetch in interface Watchableid - The identifier to fetch
RemoteException - If communication errors happenWatchable.fetch()
public Object getAdmin()
throws RemoteException
getAdmin in interface AdministrableRemoteExceptionAdministrable.getAdmin()public Uuid getReferentUuid()
getReferentUuid in interface ReferentUuidReferentUuid.getReferentUuid()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||