Package org.apache.catalina.tribes
Interface ChannelMessage
- 
- All Superinterfaces:
- java.lang.Cloneable,- java.io.Serializable
 - All Known Implementing Classes:
- ChannelData
 
 public interface ChannelMessage extends java.io.Serializable, java.lang.CloneableMessage that is passed through the interceptor stack after the data serialized in the Channel object and then passed down to the interceptor and eventually down to the ChannelSender component
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectclone()Shallow clone, what gets cloned depends on the implementationjava.lang.Objectdeepclone()Deep clone, all fields MUST get clonedMembergetAddress()Get the address that this message originated from.XByteBuffergetMessage()returns the byte buffer that contains the actual message payloadintgetOptions()The message options is a 32 bit flag set that triggers interceptors and message behavior.longgetTimestamp()Timestamp of when the message was created.byte[]getUniqueId()Each message must have a globally unique Id.voidsetAddress(Member member)Sets the source or reply-to address of this messagevoidsetMessage(XByteBuffer buf)The byte buffer that contains the actual message payloadvoidsetOptions(int options)sets the option bits for this messagevoidsetTimestamp(long timestamp)Sets the timestamp of this message.
 
- 
- 
- 
Method Detail- 
getAddressMember getAddress() Get the address that this message originated from. Almost alwaysChannel.getLocalMember(boolean)
 This would be set to a different address if the message was being relayed from a host other than the one that originally sent it.- Returns:
- the source or reply-to address of this message
 
 - 
setAddressvoid setAddress(Member member) Sets the source or reply-to address of this message- Parameters:
- member- Member
 
 - 
getTimestamplong getTimestamp() Timestamp of when the message was created.- Returns:
- long timestamp in milliseconds
 
 - 
setTimestampvoid setTimestamp(long timestamp) Sets the timestamp of this message.- Parameters:
- timestamp- The timestamp
 
 - 
getUniqueIdbyte[] getUniqueId() Each message must have a globally unique Id. interceptors heavily depend on this id for message processing- Returns:
- byte
 
 - 
setMessagevoid setMessage(XByteBuffer buf) The byte buffer that contains the actual message payload- Parameters:
- buf- XByteBuffer
 
 - 
getMessageXByteBuffer getMessage() returns the byte buffer that contains the actual message payload- Returns:
- XByteBuffer
 
 - 
getOptionsint getOptions() The message options is a 32 bit flag set that triggers interceptors and message behavior.- Returns:
- int - the option bits set for this message
- See Also:
- Channel.send(Member[], Serializable, int),- ChannelInterceptor.getOptionFlag()
 
 - 
setOptionsvoid setOptions(int options) sets the option bits for this message- Parameters:
- options- int
- See Also:
- getOptions()
 
 - 
clonejava.lang.Object clone() Shallow clone, what gets cloned depends on the implementation- Returns:
- ChannelMessage
 
 - 
deepclonejava.lang.Object deepclone() Deep clone, all fields MUST get cloned- Returns:
- ChannelMessage
 
 
- 
 
-