org.objectweb.proactive.core.body.rmi
Class RmiBodyAdapter
java.lang.Object
org.objectweb.proactive.core.body.BodyAdapter
org.objectweb.proactive.core.body.BodyAdapterImpl
org.objectweb.proactive.core.body.rmi.RmiBodyAdapter
- All Implemented Interfaces:
- java.lang.Cloneable, Job, NFEProducer, SecurityEntity, java.io.Serializable, UniversalBody
- Direct Known Subclasses:
- SshRmiBodyAdapter
- public class RmiBodyAdapter
- extends BodyAdapterImpl
An RMI adapter for a RemoteBody. The Adpater is the generic entry point for remote calls
to a RemoteBody using RMI.
This also allows to cache informations, and so to avoid crossing the network when calling some methods.
- Since:
- ProActive 2.2
- Author:
- ProActiveTeam
- See Also:
- smartProxy Pattern.,
Serialized Form
Method Summary |
UniversalBody |
lookup(java.lang.String url)
Looks-up an active object previously registered in a RMI registry. |
void |
register(java.lang.String url)
Registers an active object into a RMI registry. |
void |
unregister(java.lang.String url)
Unregisters an active object previously registered into a RMI registry. |
Methods inherited from class org.objectweb.proactive.core.body.BodyAdapterImpl |
addNFEListener, changeProxiedBody, construct, createShortcut, disableAC, enableAC, equals, fireNFE, getCertificate, getCertificateEncoded, getEntities, getID, getJobID, getNodeURL, getPolicy, getPublicKey, getRemoteAdapter, hashCode, publicKeyExchange, randomValue, readResolve, receiveFTMessage, receiveReply, receiveRequest, removeImmediateService, removeNFEListener, secretKeyExchange, setImmediateService, setImmediateService, startNewSession, terminate, terminateSession, updateLocation |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
RmiBodyAdapter
public RmiBodyAdapter()
RmiBodyAdapter
protected RmiBodyAdapter(RmiRemoteBody remoteBody)
throws ProActiveException
RmiBodyAdapter
public RmiBodyAdapter(UniversalBody body)
throws ProActiveException
register
public void register(java.lang.String url)
throws java.io.IOException
- Registers an active object into a RMI registry. In fact it is the
remote version of the body of the active object that is registered into the
RMI Registry under the given URL.
- Specified by:
register
in class BodyAdapterImpl
- Parameters:
url
- the url under which the remote body is registered.
- Throws:
java.io.IOException
- if the remote body cannot be registered
unregister
public void unregister(java.lang.String url)
throws java.io.IOException
- Unregisters an active object previously registered into a RMI registry.
- Specified by:
unregister
in class BodyAdapterImpl
- Parameters:
url
- the url under which the active object is registered.
- Throws:
java.io.IOException
- if the remote object cannot be removed from the registry
lookup
public UniversalBody lookup(java.lang.String url)
throws java.io.IOException
- Looks-up an active object previously registered in a RMI registry. In fact it is the
remote version of the body of an active object that can be registered into the
RMI Registry under a given URL.
- Specified by:
lookup
in class BodyAdapterImpl
- Parameters:
url
- the url the remote Body is registered to
- Returns:
- a UniversalBody
- Throws:
java.io.IOException
- if the remote body cannot be found under the given url
or if the object found is not of type RmiRemoteBody
Copyright 2001-2005 INRIA All Rights Reserved.