|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.body.request.AwaitedRequest
This class defines a particular request that is subject to wait-by-necessity mecanism. It only contains the Id of the awaited sender. When this awaited sender eventually send a request, the corresponding awaited request is updated, and then behaves as a normal ProActive request. If an active object tries to serve an awaited request that is not yet updated, it's activity is suspended until the awaited request is updated. This request can be considered as a "future of request". (@see org.objectweb.proactive.core.body.future.Future)
Field Summary | |
static org.apache.log4j.Logger |
logger
Logger |
Constructor Summary | |
AwaitedRequest(UniqueID awaitedSender)
Create a new awaited request. |
Method Summary | |
boolean |
decrypt(ProActiveSecurityManager psm)
|
UniqueID |
getAwaitedSender()
Return the id of the awaited sender |
FTManager |
getFTManager()
Return the FTManager that have to treat this message |
char[] |
getMessageInfo()
Returns fault-tolerance infos piggybacked on this message |
MethodCall |
getMethodCall()
Returns the MethodCall embedded in the request |
java.lang.String |
getMethodName()
Returns the method name of the method call packed in this message |
java.lang.Object |
getParameter(int index)
Returns the parameter number index from the method call
embedded in the request |
UniversalBody |
getSender()
Returns the sender of this request |
long |
getSequenceNumber()
Returns a unique sequence number of this message |
long |
getSessionId()
|
UniqueID |
getSourceBodyID()
Returns the id of the body source of this message |
long |
getTimeStamp()
Returns the time this message was created or deserialized |
boolean |
hasBeenForwarded()
Returns true if the request has been forwarded |
boolean |
ignoreIt()
Return true if this message must be ignored by the receiver |
boolean |
isCiphered()
|
boolean |
isOneWay()
Returns true if the message will not generate a response message |
void |
notifyReception(UniversalBody bodyReceiver)
Notifies the request that it has been received by the destination. |
void |
resetSendCounter()
Set the send counter to 0. |
int |
send(UniversalBody destinationBody)
Sends this request to the body destination |
Reply |
serve(Body targetBody)
Serve the request. |
Reply |
serveAlternate(Body targetBody,
NonFunctionalException nfe)
Create a fake but valid reply by encapsulating a non functional exception instead of a result |
void |
setAwaitedRequest(Request r)
Update this awaited request with a received request from the awaited sender. |
void |
setFTManager(FTManager ft)
Set the FTManager that have to treat this message |
void |
setIgnoreIt(boolean ignore)
Set or unset the ignore tag. |
void |
setMessageInfo(char[] mi)
Set fault-tolerance infos piggybacked on this message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static org.apache.log4j.Logger logger
Constructor Detail |
public AwaitedRequest(UniqueID awaitedSender)
awaitedSender
- the id of the awaited sender.Method Detail |
public void setAwaitedRequest(Request r)
r
- the received request.public UniqueID getAwaitedSender()
public Reply serve(Body targetBody) throws ServeException
serve
in interface Request
targetBody
- the body destination of the call
ServeException
- if the method call fails to be servedpublic MethodCall getMethodCall()
Request
getMethodCall
in interface Request
public java.lang.Object getParameter(int index)
Request
index
from the method call
embedded in the request
getParameter
in interface Request
index
- the position of the parameter to return.
public UniversalBody getSender()
Request
getSender
in interface Request
public boolean hasBeenForwarded()
Request
hasBeenForwarded
in interface Request
public void resetSendCounter()
Request
resetSendCounter
in interface Request
public void notifyReception(UniversalBody bodyReceiver) throws java.io.IOException
Request
notifyReception
in interface Request
bodyReceiver
- the body destination that received the request
java.io.IOException
- if the request failed to perform a possible
operation upon that notificationpublic int send(UniversalBody destinationBody) throws java.io.IOException, RenegotiateSessionException
Request
send
in interface Request
destinationBody
- the body destination of this request
java.io.IOException
- if the request fails to be sent
RenegotiateSessionException
public java.lang.String getMethodName()
Message
getMethodName
in interface Message
public UniqueID getSourceBodyID()
Message
getSourceBodyID
in interface Message
public long getTimeStamp()
Message
getTimeStamp
in interface Message
public boolean isOneWay()
Message
isOneWay
in interface Message
public long getSequenceNumber()
Message
getSequenceNumber
in interface Message
public void setMessageInfo(char[] mi)
Message
setMessageInfo
in interface Message
mi
- an array of chars that contains fault-tolerance infospublic char[] getMessageInfo()
Message
getMessageInfo
in interface Message
public void setIgnoreIt(boolean ignore)
Message
setIgnoreIt
in interface Message
ignore
- true if this request must be ignored, false otherwise.public boolean ignoreIt()
Message
ignoreIt
in interface Message
public void setFTManager(FTManager ft)
Message
setFTManager
in interface Message
ft
- the FTManager that have to treat this messagepublic FTManager getFTManager()
Message
getFTManager
in interface Message
public Reply serveAlternate(Body targetBody, NonFunctionalException nfe)
Request
serveAlternate
in interface Request
targetBody
- the body destination of the call
public boolean isCiphered()
isCiphered
in interface Request
public long getSessionId()
getSessionId
in interface Request
public boolean decrypt(ProActiveSecurityManager psm) throws RenegotiateSessionException
decrypt
in interface Request
RenegotiateSessionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |