org.objectweb.proactive.core.body.message
Class MessageImpl

java.lang.Object
  extended byorg.objectweb.proactive.core.body.message.MessageImpl
All Implemented Interfaces:
Message, java.io.Serializable
Direct Known Subclasses:
BodyRequest, ReplyImpl, RequestImpl

public class MessageImpl
extends java.lang.Object
implements Message, java.io.Serializable

Implements a simple message encapsulating a method call between two active objects.

Since:
ProActive 0.9
Version:
1.0, 2001/10/23
Author:
ProActive Team
See Also:
Serialized Form

Field Summary
protected  FTManager ftm
          ftmanager linked to this message
protected  boolean ignoreIt
          true if this message can be ignored
protected  boolean isOneWay
           
protected  MessageInfo messageInfos
          all values piggybacked for fault tolerance stuff
protected  java.lang.String methodName
          The name of the method called
protected  long sequenceNumber
          The unique sequence number for the message
protected  UniqueID sourceID
          The UniqueID of the body sending the message
protected  long timeStamp
          the time the message has been issued or deserialized
 
Constructor Summary
MessageImpl(UniqueID sourceID, long sequenceNumber, boolean isOneWay, java.lang.String methodName)
          Creates a new Message based on the given information.
 
Method Summary
 FTManager getFTManager()
          Return the FTManager that have to treat this message
 MessageInfo getMessageInfo()
          Returns fault-tolerance infos piggybacked on this message
 java.lang.String getMethodName()
          Returns the method name of the method call packed in this message
 long getSequenceNumber()
          Returns a unique sequence number of this message
 UniqueID getSourceBodyID()
          Returns the id of the body source of this message
 long getTimeStamp()
          Returns the time this message was created or deserialized
 boolean ignoreIt()
          Return true if this message must be ignored by the receiver
 boolean isOneWay()
          Returns true if the message will not generate a response message
 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(MessageInfo mi)
          Set fault-tolerance infos piggybacked on this message
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

methodName

protected java.lang.String methodName
The name of the method called


sourceID

protected UniqueID sourceID
The UniqueID of the body sending the message


sequenceNumber

protected long sequenceNumber
The unique sequence number for the message


timeStamp

protected transient long timeStamp
the time the message has been issued or deserialized


isOneWay

protected boolean isOneWay

messageInfos

protected MessageInfo messageInfos
all values piggybacked for fault tolerance stuff


ignoreIt

protected boolean ignoreIt
true if this message can be ignored


ftm

protected transient FTManager ftm
ftmanager linked to this message

Constructor Detail

MessageImpl

public MessageImpl(UniqueID sourceID,
                   long sequenceNumber,
                   boolean isOneWay,
                   java.lang.String methodName)
Creates a new Message based on the given information.

Parameters:
sourceID - the id of the sender of this message
sequenceNumber - the unique sequence number of this message
isOneWay - true if oneWay
methodName - the method name of the method call
Method Detail

toString

public java.lang.String toString()

getSourceBodyID

public UniqueID getSourceBodyID()
Description copied from interface: Message
Returns the id of the body source of this message

Specified by:
getSourceBodyID in interface Message
Returns:
the id of the body source of this message

getMethodName

public java.lang.String getMethodName()
Description copied from interface: Message
Returns the method name of the method call packed in this message

Specified by:
getMethodName in interface Message
Returns:
the method name of the method call packed in this message

getSequenceNumber

public long getSequenceNumber()
Description copied from interface: Message
Returns a unique sequence number of this message

Specified by:
getSequenceNumber in interface Message
Returns:
a unique sequence number of this message

isOneWay

public boolean isOneWay()
Description copied from interface: Message
Returns true if the message will not generate a response message

Specified by:
isOneWay in interface Message
Returns:
true if the message will not generate a response message

getTimeStamp

public long getTimeStamp()
Description copied from interface: Message
Returns the time this message was created or deserialized

Specified by:
getTimeStamp in interface Message
Returns:
the time this message was created or deserialized

getMessageInfo

public MessageInfo getMessageInfo()
Description copied from interface: Message
Returns fault-tolerance infos piggybacked on this message

Specified by:
getMessageInfo in interface Message
Returns:
a MessageInfo object that contains fault-tolerance infos OR null if the attached message has been sent by a non fault-tolerant object

setMessageInfo

public void setMessageInfo(MessageInfo mi)
Description copied from interface: Message
Set fault-tolerance infos piggybacked on this message

Specified by:
setMessageInfo in interface Message
Parameters:
mi - a MessageInfo object that contains fault-tolerance infos

ignoreIt

public boolean ignoreIt()
Description copied from interface: Message
Return true if this message must be ignored by the receiver

Specified by:
ignoreIt in interface Message
Returns:
true if this message must be ignored by the receiver

setIgnoreIt

public void setIgnoreIt(boolean ignore)
Description copied from interface: Message
Set or unset the ignore tag.

Specified by:
setIgnoreIt in interface Message
Parameters:
ignore - true if this request must be ignored, false otherwise.

setFTManager

public void setFTManager(FTManager ft)
Description copied from interface: Message
Set the FTManager that have to treat this message

Specified by:
setFTManager in interface Message
Parameters:
ft - the FTManager that have to treat this message

getFTManager

public FTManager getFTManager()
Description copied from interface: Message
Return the FTManager that have to treat this message

Specified by:
getFTManager in interface Message
Returns:
the FTManager that have to treat this message


Copyright 2001-2005 INRIA All Rights Reserved.