org.universAAL.ri.gateway.communicator.service.impl
Class MessageWrapper

Package class diagram package MessageWrapper
java.lang.Object
  extended by org.universAAL.ri.gateway.communicator.service.impl.MessageWrapper
All Implemented Interfaces:
Serializable

public class MessageWrapper
extends Object
implements Serializable

A message wrapper for requests and responses sent between communicators.

Author:
skallz
See Also:
Serialized Form

Constructor Summary
MessageWrapper(MessageType type, Message message, String sourceId)
          Wraps a message with a random ID.
MessageWrapper(MessageType type, Message message, URL returnTo, String sourceId)
          Wraps an asynchronous request stating where it should be sent back.
MessageWrapper(MessageType type, Message message, UUID id, String sourceId)
          Wraps a message with a concrete ID (for responses).
 
Method Summary
 UUID getId()
           
 Message getMessage()
           
 URL getReturnTo()
           
 String getSourceId()
           
 MessageType getType()
           
 void setSourceId(String sourceId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageWrapper

public MessageWrapper(MessageType type,
                      Message message,
                      UUID id,
                      String sourceId)
Wraps a message with a concrete ID (for responses).

Parameters:
type - type of the message
message - the message
id - ID

MessageWrapper

public MessageWrapper(MessageType type,
                      Message message,
                      String sourceId)
Wraps a message with a random ID.

Parameters:
type - type of the message
message - the message

MessageWrapper

public MessageWrapper(MessageType type,
                      Message message,
                      URL returnTo,
                      String sourceId)
Wraps an asynchronous request stating where it should be sent back.

Parameters:
type - type of the message
message - the message
returnTo - where to send it back
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getId

public UUID getId()
Returns:
the id

getType

public MessageType getType()
Returns:
the type

getMessage

public Message getMessage()
Returns:
the message

getReturnTo

public URL getReturnTo()
Returns:
the returnTo

getSourceId

public String getSourceId()

setSourceId

public void setSourceId(String sourceId)


Copyright © 2014 universAAL Consortium. All Rights Reserved.