service
Class TypedMessage

java.lang.Object
  extended by communication.Message
      extended by service.TypedMessage
All Implemented Interfaces:
java.io.Serializable

public class TypedMessage
extends Message

A typed message is a message with its associated type of service

See Also:
Serialized Form

Field Summary
protected  MessageType type
          Type of the service
 
Fields inherited from class communication.Message
data, processId
 
Constructor Summary
TypedMessage(ProcessIdentifier processId, java.lang.Object data, MessageType type)
          Create a typed message
 
Method Summary
 MessageType getType()
           
 void setType(MessageType type)
           
 Message untypeMessage()
           
 
Methods inherited from class communication.Message
getData, getProcessId, setData, setProcessId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected MessageType type
Type of the service

Constructor Detail

TypedMessage

public TypedMessage(ProcessIdentifier processId,
                    java.lang.Object data,
                    MessageType type)
Create a typed message

Parameters:
processId - the process identifier for the message
data - data the data of the message
type - the type of the service
Method Detail

getType

public MessageType getType()
Returns:
the type of the service

setType

public void setType(MessageType type)
Parameters:
type - the type of the service

untypeMessage

public Message untypeMessage()
Returns:
the message embedded in the typed message