org.objectweb.proactive.core.body
Class BodyAdapter

java.lang.Object
  extended byorg.objectweb.proactive.core.body.BodyAdapter
All Implemented Interfaces:
Job, NFEProducer, SecurityEntity, java.io.Serializable, UniversalBody
Direct Known Subclasses:
BodyAdapterForwarder, BodyAdapterImpl

public abstract class BodyAdapter
extends java.lang.Object
implements UniversalBody, java.io.Serializable

An adapter for a RemoteBody. The Adpater is the generic entry point for remote calls to a RemoteBody using different protocols such as RMI, RMISSH, IBIS, HTTP, JINI. 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

Field Summary
protected  UniqueID bodyID
          Cache the ID of the Body locally for speed
protected  java.lang.String jobID
          Cache the jobID locally for speed
 
Fields inherited from interface org.objectweb.proactive.core.body.UniversalBody
bodyLogger
 
Constructor Summary
BodyAdapter()
           
 
Method Summary
abstract  void changeProxiedBody(Body newBody)
          Change the body referenced by this adapter.
abstract  UniversalBody lookup(java.lang.String url)
          Looks-up an active object previously registered in a registry.
abstract  void register(java.lang.String url)
          Registers an active object into protocol-specific registry.
abstract  void unregister(java.lang.String url)
          Unregisters an active object previously registered into a registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.proactive.core.body.UniversalBody
createShortcut, disableAC, enableAC, getID, getNodeURL, getRemoteAdapter, receiveFTMessage, receiveReply, receiveRequest, removeImmediateService, setImmediateService, setImmediateService, terminate, updateLocation
 
Methods inherited from interface org.objectweb.proactive.core.exceptions.manager.NFEProducer
addNFEListener, fireNFE, removeNFEListener
 
Methods inherited from interface org.objectweb.proactive.Job
getJobID
 
Methods inherited from interface org.objectweb.proactive.ext.security.SecurityEntity
getCertificate, getCertificateEncoded, getEntities, getPolicy, getPublicKey, publicKeyExchange, randomValue, secretKeyExchange, startNewSession, terminateSession
 

Field Detail

bodyID

protected UniqueID bodyID
Cache the ID of the Body locally for speed


jobID

protected java.lang.String jobID
Cache the jobID locally for speed

Constructor Detail

BodyAdapter

public BodyAdapter()
Method Detail

lookup

public abstract UniversalBody lookup(java.lang.String url)
                              throws java.io.IOException
Looks-up an active object previously registered in a registry. In fact it is the remote version of the body of an active object that can be registered into the Registry under a given URL.

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 RemoteBody

register

public abstract void register(java.lang.String url)
                       throws java.io.IOException
Registers an active object into protocol-specific registry. In fact it is the remote version of the body of the active object that is registered into the Registry under the given URL.

Parameters:
url - the url under which the remote body is registered.
Throws:
java.io.IOException - if the remote body cannot be registered

unregister

public abstract void unregister(java.lang.String url)
                         throws java.io.IOException
Unregisters an active object previously registered into a registry.

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

changeProxiedBody

public abstract void changeProxiedBody(Body newBody)
                                throws java.io.IOException
Change the body referenced by this adapter.

Parameters:
newBody - the body referenced after the call
Throws:
java.io.IOException - if a pb occurs during this method call


Copyright 2001-2005 INRIA All Rights Reserved.