org.jdesktop.wonderland.common.messages
Class Message

java.lang.Object
  extended by org.jdesktop.wonderland.common.messages.Message
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttachClientMessage, CellEditMessage, CellHierarchyMessage, CellMessage, DetachClientMessage, MessageList, ProtocolSelectionMessage, ResponseMessage, SessionInitializationMessage, WonderlandSetupMessage

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

The base type of a message in the Wonderland system.

Every message in the system has a unique identifier. This identifier is unique within the context of the session that created it, but may not be globally unique. For message that need to be unique across clients, the session id of the originating session should be included in the message.

Wonderland messages are by default serialized and sent to clients. Messages that are very frequent should be hand-packed using the Externalizable interface.

Author:
jkaplan
See Also:
Externalizable, Serialized Form

Constructor Summary
protected Message()
          Create a new message with a new MessageID generated by calling MessageID.generateMessageID();
protected Message(MessageID messageID)
          Create a new message with an existing message id.
 
Method Summary
 MessageID getMessageID()
          Get the ID of a message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

protected Message()
Create a new message with a new MessageID generated by calling MessageID.generateMessageID();


Message

protected Message(MessageID messageID)
Create a new message with an existing message id. This can be used when MessageIDs are known in advance (e.g. for response messages) or when a different message ID generation scheme is in use.

Parameters:
messageID - the ID of this message
Method Detail

getMessageID

public MessageID getMessageID()
Get the ID of a message

Returns:
the MessageID


Open Wonderland - http://openwonderland.org