|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.body.AbstractUniversalBody
org.objectweb.proactive.core.body.AbstractBody
org.objectweb.proactive.core.body.BodyImpl
**For internal use only**
This class gives a common implementation of the Body interface. It provides all the non specific behavior allowing sub-class to write the detail implementation.
Each body is identify by an unique identifier.
All active bodies that get created in one JVM register themselves into a table that allows to tack them done. The registering and deregistering is done by the AbstractBody and the table is managed here as well using some static methods.
In order to let somebody customize the body of an active object without subclassing it, AbstractBody delegates lot of tasks to satellite objects that implements a given interface. Abstract protected methods instantiate those objects allowing subclasses to create them as they want (using customizable factories or instance).
Body
,
UniqueID
,
Serialized FormField Summary | |
protected MessageEventProducerImpl |
messageEventProducer
|
protected ReplyReceiver |
replyReceiver
The component in charge of receiving reply |
protected RequestReceiver |
requestReceiver
The component in charge of receiving request |
Fields inherited from class org.objectweb.proactive.core.body.AbstractBody |
ftmanager, internalBodySecurity, isInterfaceSecureImplemented, isSecurityOn, localBodyStrategy, logger, openedSessions, psm, spmdManager, threadStore |
Fields inherited from class org.objectweb.proactive.core.body.AbstractUniversalBody |
bodyID, jobID, location, nodeURL, remoteBody, remoteBodyFactory |
Constructor Summary | |
BodyImpl()
Creates a new AbstractBody. |
|
BodyImpl(java.lang.Object reifiedObject,
java.lang.String nodeURL,
MetaObjectFactory factory,
java.lang.String jobId)
Creates a new AbstractBody for an active object attached to a given node. |
Method Summary | |
protected void |
activityStopped()
Signals that the activity of this body, managed by the active thread has just stopped. |
void |
addMessageEventListener(MessageEventListener listener)
Adds a listener of MessageEvent to this body. |
protected int |
internalReceiveReply(Reply reply)
Receives a reply in response to a former request. |
protected int |
internalReceiveRequest(Request request)
Receives a request for later processing. |
void |
removeMessageEventListener(MessageEventListener listener)
Removes the MessageEventListener from this body. |
void |
setImmediateService(java.lang.String methodName)
For setting an immediate service for this body. |
void |
updateNodeURL(java.lang.String newNodeURL)
Set the nodeURL of this body |
Methods inherited from class org.objectweb.proactive.core.body.AbstractUniversalBody |
getID, getJobID, getNodeURL, getRemoteAdapter, updateLocation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.body.UniversalBody |
getID, getNodeURL, getRemoteAdapter, updateLocation |
Methods inherited from interface org.objectweb.proactive.Job |
getJobID |
Field Detail |
protected ReplyReceiver replyReceiver
protected RequestReceiver requestReceiver
protected MessageEventProducerImpl messageEventProducer
Constructor Detail |
public BodyImpl()
public BodyImpl(java.lang.Object reifiedObject, java.lang.String nodeURL, MetaObjectFactory factory, java.lang.String jobId)
reifiedObject
- the active object that body is fornodeURL
- the URL of the node that body is attached tofactory
- the factory able to construct new factories for each type of meta objects
needed by this bodyMethod Detail |
public void addMessageEventListener(MessageEventListener listener)
MessageEventProducer
addMessageEventListener
in interface MessageEventProducer
listener
- the listener to addpublic void removeMessageEventListener(MessageEventListener listener)
MessageEventProducer
removeMessageEventListener
in interface MessageEventProducer
listener
- the listener to removeprotected int internalReceiveRequest(Request request) throws java.io.IOException, RenegotiateSessionException
internalReceiveRequest
in class AbstractBody
request
- the request to process
java.io.IOException
- if the request cannot be accepted
RenegotiateSessionException
protected int internalReceiveReply(Reply reply) throws java.io.IOException
internalReceiveReply
in class AbstractBody
reply
- the reply received
java.io.IOException
- if the reply cannot be acceptedprotected void activityStopped()
activityStopped
in class AbstractBody
public void setImmediateService(java.lang.String methodName) throws java.io.IOException
UniversalBody
setImmediateService
in interface UniversalBody
java.io.IOException
public void updateNodeURL(java.lang.String newNodeURL)
Body
updateNodeURL
in interface Body
newNodeURL
- the new URL of the node
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |