org.granite.client.messaging.messages.responses
Class AbstractResponseMessage

java.lang.Object
  extended by org.granite.client.messaging.messages.AbstractMessage
      extended by org.granite.client.messaging.messages.responses.AbstractResponseMessage
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, Iterable<ResponseMessage>, Message, MessageChain<ResponseMessage>, ResponseMessage
Direct Known Subclasses:
FaultMessage, ResultMessage

public abstract class AbstractResponseMessage
extends AbstractMessage
implements ResponseMessage

Author:
Franck WOLFF
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.granite.client.messaging.messages.Message
Message.Type
 
Constructor Summary
AbstractResponseMessage()
           
AbstractResponseMessage(String clientId, String correlationId)
           
AbstractResponseMessage(String id, String clientId, long timestamp, long timeToLive, Map<String,Object> headers, String correlationId)
           
 
Method Summary
protected  void copy(AbstractMessage message)
           
protected  void copy(AbstractResponseMessage message, String correlationId)
           
 ResponseMessage copy(String correlationId)
           
 String getCorrelationId()
           
 ResponseMessage getNext()
           
 Iterator<ResponseMessage> iterator()
           
 void readExternal(ObjectInput in)
           
 void setCorrelationId(String correlationId)
           
 void setNext(ResponseMessage next)
           
 StringBuilder toString(StringBuilder sb)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.granite.client.messaging.messages.AbstractMessage
clone, equals, getClientId, getHeader, getHeaders, getId, getRemainingTimeToLive, getRemainingTimeToLive, getTimestamp, getTimeToLive, hashCode, headerExists, isExpired, isExpired, setClientId, setHeader, setHeaders, setId, setTimestamp, setTimeToLive, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.granite.client.messaging.messages.ResponseMessage
getData
 
Methods inherited from interface org.granite.client.messaging.messages.Message
clone, copy, getClientId, getHeader, getHeaders, getId, getRemainingTimeToLive, getRemainingTimeToLive, getTimestamp, getTimeToLive, getType, headerExists, isExpired, isExpired, setClientId, setHeader, setHeaders, setId, setTimestamp, setTimeToLive
 

Constructor Detail

AbstractResponseMessage

public AbstractResponseMessage()

AbstractResponseMessage

public AbstractResponseMessage(String clientId,
                               String correlationId)

AbstractResponseMessage

public AbstractResponseMessage(String id,
                               String clientId,
                               long timestamp,
                               long timeToLive,
                               Map<String,Object> headers,
                               String correlationId)
Method Detail

getCorrelationId

public String getCorrelationId()
Specified by:
getCorrelationId in interface ResponseMessage

setCorrelationId

public void setCorrelationId(String correlationId)
Specified by:
setCorrelationId in interface ResponseMessage

setNext

public void setNext(ResponseMessage next)
Specified by:
setNext in interface MessageChain<ResponseMessage>

getNext

public ResponseMessage getNext()
Specified by:
getNext in interface MessageChain<ResponseMessage>

iterator

public Iterator<ResponseMessage> iterator()
Specified by:
iterator in interface Iterable<ResponseMessage>

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractMessage
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractMessage
Throws:
IOException

copy

protected void copy(AbstractMessage message)
Overrides:
copy in class AbstractMessage

copy

protected void copy(AbstractResponseMessage message,
                    String correlationId)

copy

public ResponseMessage copy(String correlationId)
Specified by:
copy in interface ResponseMessage

toString

public StringBuilder toString(StringBuilder sb)
Overrides:
toString in class AbstractMessage