com.groiss.cluster.communication
Class Message

java.lang.Object
  extended by com.groiss.cluster.communication.Message
All Implemented Interfaces:
java.io.Serializable

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

This class represents a message sent by the cluster communication mechanism.

It can transport an arbitrary serializable object.

See Also:
Serialized Form

Constructor Summary
Message()
          Default constructor
Message(java.io.Serializable content)
          Constructs a message and initializes the content.
 
Method Summary
 java.io.Serializable getContent()
          Return the content of this message.
 java.lang.String getFrom()
          Returns the node id of the sender of the message.
 void setContent(java.io.Serializable content)
          Set the content of this message.
 java.lang.String toString()
          Return a String representation of this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Default constructor


Message

public Message(java.io.Serializable content)
Constructs a message and initializes the content.

Parameters:
content -
Method Detail

getContent

public java.io.Serializable getContent()
Return the content of this message.

Returns:
the content of this message

setContent

public void setContent(java.io.Serializable content)
Set the content of this message.

Parameters:
content - the new content

toString

public java.lang.String toString()
Return a String representation of this message.

Overrides:
toString in class java.lang.Object
Returns:
the representation of the content

getFrom

public java.lang.String getFrom()
Returns the node id of the sender of the message.

Returns:
the sender id


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.