org.objectweb.proactive
Interface Body

All Superinterfaces:
Job, LocalBodyStrategy, MessageEventProducer, NFEProducer, SecurityEntity, java.io.Serializable, UniversalBody
All Known Implementing Classes:
AbstractBody, ActiveBody, BodyImpl, ComponentBodyImpl, EncryptedBody, HalfBody, MigratableBody

public interface Body
extends LocalBodyStrategy, UniversalBody, MessageEventProducer

An object implementing this interface is an implementation of the non fonctionnal part of an ActiveObject. This representation is local to the ActiveObject. By contrast there is a remote representation of Body that can be accessed by distant object.

UniversalBody defines the remote accessible part of the body while LocalBody defines the local accessible part of the body.

The body of an ActiveObject provides needed services such as a the ability to sent and receive request and reply.

The interface also defines how the activity methods of an active object sees its Body.

A body has 2 associated states :

Note that a thread can be alive but not active, such as a forwarder that just forward request to another peer.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team

Field Summary
 
Fields inherited from interface org.objectweb.proactive.core.body.UniversalBody
bodyLogger
 
Method Summary
 void acceptCommunication()
          Signals the body to accept all incoming communications.
 void blockCommunication()
          blocks all incoming communications.
 UniversalBody checkNewLocation(UniqueID uniqueID)
          Tries to find a local version of the body of id uniqueID.
 void enterInThreadStore()
          Allows the calling thread to enter in the ThreadStore of this body.
 void exitFromThreadStore()
          Allows the calling thread to exit from the ThreadStore of this body.
 UniversalBody getShortcutTargetBody(ItfID functionalItfID)
          Returns the body that is the target of this shortcut for this component interface
 boolean isActive()
          Returns whether the body is active or not.
 boolean isAlive()
          Returns whether the body is alive or not.
 void setPolicyServer(PolicyServer server)
          set the policy server of the active object
 void updateNodeURL(java.lang.String newNodeURL)
          Set the nodeURL of this body
 
Methods inherited from interface org.objectweb.proactive.core.body.LocalBodyStrategy
getFuturePool, getName, getNextSequenceID, getReifiedObject, getRequestQueue, sendRequest, serve
 
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
 
Methods inherited from interface org.objectweb.proactive.core.body.message.MessageEventProducer
addMessageEventListener, removeMessageEventListener
 

Method Detail

isAlive

boolean isAlive()
Returns whether the body is alive or not. The body is alive as long as it is processing request and reply

Returns:
whether the body is alive or not.

isActive

boolean isActive()
Returns whether the body is active or not. The body is active as long as it has an associated thread running to serve the requests by calling methods on the active object.

Returns:
whether the body is active or not.

blockCommunication

void blockCommunication()
blocks all incoming communications. After this call, the body cannot receive any request or reply.


acceptCommunication

void acceptCommunication()
Signals the body to accept all incoming communications. This call undo a previous call to blockCommunication.


enterInThreadStore

void enterInThreadStore()
Allows the calling thread to enter in the ThreadStore of this body.


exitFromThreadStore

void exitFromThreadStore()
Allows the calling thread to exit from the ThreadStore of this body.


checkNewLocation

UniversalBody checkNewLocation(UniqueID uniqueID)
Tries to find a local version of the body of id uniqueID. If a local version is found it is returned. If not, tries to find the body of id uniqueID in the known body of this body. If a body is found it is returned, else null is returned.

Parameters:
uniqueID - the id of the body to lookup
Returns:
the last known version of the body of id uniqueID or null if not known

getShortcutTargetBody

UniversalBody getShortcutTargetBody(ItfID functionalItfID)
Returns the body that is the target of this shortcut for this component interface

Parameters:
functionalItfID - the id of the interface on which the shortcut is available
Returns:
the body that is the target of this shortcut for this interface

setPolicyServer

void setPolicyServer(PolicyServer server)
set the policy server of the active object

Parameters:
server - the policy server

updateNodeURL

void updateNodeURL(java.lang.String newNodeURL)
Set the nodeURL of this body

Parameters:
newNodeURL - the new URL of the node


Copyright 2001-2007 INRIA All Rights Reserved.