org.objectweb.proactive.core.body
Class AbstractUniversalBody

java.lang.Object
  |
  +--org.objectweb.proactive.core.body.AbstractUniversalBody
All Implemented Interfaces:
java.io.Serializable, UniversalBody
Direct Known Subclasses:
AbstractBody

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

**For internal use only**

This class gives a common implementation of the UniversalBody interface. It provides all the non specific behavior allowing sub-class to write the detail implementation.

Each body is identify by an unique identifier.

Since:
ProActive 0.9.3
Version:
1.0, 2002/06
Author:
ProActive Team
See Also:
Serialized Form

Field Summary
protected  UniqueID bodyID
          Unique ID of the body.
protected  BodyMap location
          A table containing a mapping from a UniqueID toward a Body.
protected  java.lang.String nodeURL
          The URL of the node this body is attached to
protected  UniversalBody remoteBody
          A remote version of this body that is used to send to remote peer
protected  RemoteBodyFactory remoteBodyFactory
           
 
Constructor Summary
AbstractUniversalBody()
          Creates a new AbstractBody.
AbstractUniversalBody(java.lang.String nodeURL, RemoteBodyFactory remoteBodyFactory)
          Creates a new AbstractBody for an active object attached to a given node.
 
Method Summary
 UniqueID getID()
          Returns the UniqueID of this body This identifier is unique accross all JVMs
 java.lang.String getNodeURL()
          Returns the url of the node this body is associated to The url of the node can change if the active object migrates
 UniversalBody getRemoteAdapter()
          Returns the remote friendly version of this body
 void updateLocation(UniqueID bodyID, UniversalBody body)
          Signals to this body that the body identified by id is now to a new remote location.
 
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
disableAC, enableAC, getCertificate, getCertificateEncoded, getEntities, getPolicy, getPolicyFrom, getPolicyTo, getProActiveSecurityManager, getPublicKey, getVNName, initiateSession, negociateKeyReceiverSide, publicKeyExchange, randomValue, receiveReply, receiveRequest, secretKeyExchange, setImmediateService, startNewSession, terminateSession
 

Field Detail

bodyID

protected UniqueID bodyID
Unique ID of the body.


location

protected BodyMap location
A table containing a mapping from a UniqueID toward a Body. The location table caches the location of all known bodies to whom this body communicated


nodeURL

protected java.lang.String nodeURL
The URL of the node this body is attached to


remoteBody

protected transient UniversalBody remoteBody
A remote version of this body that is used to send to remote peer


remoteBodyFactory

protected RemoteBodyFactory remoteBodyFactory
Constructor Detail

AbstractUniversalBody

public AbstractUniversalBody()
Creates a new AbstractBody. Used for serialization.


AbstractUniversalBody

public AbstractUniversalBody(java.lang.String nodeURL,
                             RemoteBodyFactory remoteBodyFactory)
Creates a new AbstractBody for an active object attached to a given node.

Parameters:
nodeURL - the URL of the node that body is attached to
Method Detail

getNodeURL

public java.lang.String getNodeURL()
Description copied from interface: UniversalBody
Returns the url of the node this body is associated to The url of the node can change if the active object migrates

Specified by:
getNodeURL in interface UniversalBody
Returns:
the url of the node this body is associated to

getRemoteAdapter

public UniversalBody getRemoteAdapter()
Description copied from interface: UniversalBody
Returns the remote friendly version of this body

Specified by:
getRemoteAdapter in interface UniversalBody
Returns:
the remote friendly version of this body

getID

public UniqueID getID()
Description copied from interface: UniversalBody
Returns the UniqueID of this body This identifier is unique accross all JVMs

Specified by:
getID in interface UniversalBody
Returns:
the UniqueID of this body

updateLocation

public void updateLocation(UniqueID bodyID,
                           UniversalBody body)
Description copied from interface: UniversalBody
Signals to this body that the body identified by id is now to a new remote location. The body given in parameter is a new stub pointing to this new location. This call is a way for a body to signal to his peer that it has migrated to a new location

Specified by:
updateLocation in interface UniversalBody
Parameters:
bodyID - the id of the body
body - the stub to the new location


Copyright © April 2004 INRIA All Rights Reserved.