ecologylab.services.distributed.impl
Class MessageWithMetadata<M extends ServiceMessage>

java.lang.Object
  extended by ecologylab.services.distributed.impl.MessageWithMetadata<M>
All Implemented Interfaces:
java.lang.Comparable<MessageWithMetadata<M>>

public class MessageWithMetadata<M extends ServiceMessage>
extends java.lang.Object
implements java.lang.Comparable<MessageWithMetadata<M>>

Represents a RequestMessage that has been translated to XML. This object encapsulates the XML String, along with the request's UID.

Author:
Zachary O. Toups (toupsz@cs.tamu.edu)

Constructor Summary
MessageWithMetadata()
           
MessageWithMetadata(M response, long uid)
           
 
Method Summary
 void clear()
          Resets this for re-use.
 int compareTo(MessageWithMetadata<M> arg0)
           
 M getMessage()
           
 long getUid()
           
 void setMessage(M response)
           
 void setUid(long uid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWithMetadata

public MessageWithMetadata(M response,
                           long uid)

MessageWithMetadata

public MessageWithMetadata()
Method Detail

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

compareTo

public int compareTo(MessageWithMetadata<M> arg0)
Specified by:
compareTo in interface java.lang.Comparable<MessageWithMetadata<M extends ServiceMessage>>

setUid

public void setUid(long uid)
Parameters:
uid - the uid to set