ecologylab.services.distributed.impl
Class MessageWithMetadata<M extends ServiceMessage,A>
java.lang.Object
ecologylab.services.distributed.impl.MessageWithMetadata<M,A>
- All Implemented Interfaces:
- java.lang.Comparable<MessageWithMetadata<M,A>>
public class MessageWithMetadata<M extends ServiceMessage,A>
- extends java.lang.Object
- implements java.lang.Comparable<MessageWithMetadata<M,A>>
Represents a RequestMessage that has been translated to XML. This object encapsulates the XML String, along with the
request's UID, SID, and a user specified Attachment;
- Author:
- Zachary O. Toups (toupsz@cs.tamu.edu), Bill Hamilton (bill@ecologylab.net)
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageWithMetadata
public MessageWithMetadata(M response,
long uid,
A attachment)
MessageWithMetadata
public MessageWithMetadata(M response,
long uid)
MessageWithMetadata
public MessageWithMetadata(M response)
MessageWithMetadata
public MessageWithMetadata()
clear
public void clear()
- Resets this for re-use.
getMessage
public M getMessage()
- Returns:
- the request
setMessage
public void setMessage(M response)
getUid
public long getUid()
- Returns:
- the uid
getAttachment
public A getAttachment()
- Returns:
- the attachment
compareTo
public int compareTo(MessageWithMetadata<M,A> arg0)
- Specified by:
compareTo in interface java.lang.Comparable<MessageWithMetadata<M extends ServiceMessage,A>>
setUid
public void setUid(long uid)
- Parameters:
uid - the uid to set
setAttachment
public void setAttachment(A attachment)
- Parameters:
attachment - the attachment to set