|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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 java.lang.String |
JobID
|
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 |
internalBodySecurity, isSecurityOn, localBodyStrategy, logger, openedSessions, pgm, psm, threadStore |
Fields inherited from class org.objectweb.proactive.core.body.AbstractUniversalBody |
bodyID, 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. |
java.lang.String |
getJobID()
|
protected void |
internalReceiveReply(Reply reply)
Receives a reply in response to a former request. |
protected void |
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. |
Methods inherited from class org.objectweb.proactive.core.body.AbstractUniversalBody |
getID, 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 |
Field Detail |
protected ReplyReceiver replyReceiver
protected RequestReceiver requestReceiver
protected MessageEventProducerImpl messageEventProducer
protected java.lang.String JobID
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 java.lang.String getJobID()
getJobID
in interface Job
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 void 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 void 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |