FileDocCategorySizeDatePackage
ChannelMessage.javaAPI DocApache Tomcat 6.0.143428Fri Jul 20 04:20:36 BST 2007org.apache.catalina.tribes

ChannelMessage

public interface ChannelMessage implements Serializable
Message 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
author
Filip Hanik

Fields Summary
Constructors Summary
Methods Summary
public java.lang.Objectclone()
Shallow clone, what gets cloned depends on the implementation

return
ChannelMessage

public java.lang.Objectdeepclone()
Deep clone, all fields MUST get cloned

return
ChannelMessage

public MembergetAddress()
Get the address that this message originated from. Almost always Channel.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.

return
the source or reply-to address of this message

public org.apache.catalina.tribes.io.XByteBuffergetMessage()
returns the byte buffer that contains the actual message payload

return
XByteBuffer

public intgetOptions()
The message options is a 32 bit flag set that triggers interceptors and message behavior.

see
Channel#send(Member[], Serializable, int)
see
ChannelInterceptor#getOptionFlag
return
int - the option bits set for this message

public longgetTimestamp()
Timestamp of when the message was created.

return
long timestamp in milliseconds

public byte[]getUniqueId()
Each message must have a globally unique Id. interceptors heavily depend on this id for message processing

return
byte

public voidsetAddress(Member member)
Sets the source or reply-to address of this message

param
member Member

public voidsetMessage(org.apache.catalina.tribes.io.XByteBuffer buf)
The byte buffer that contains the actual message payload

param
buf XByteBuffer

public voidsetOptions(int options)
sets the option bits for this message

param
options int
see
#getOptions()

public voidsetTimestamp(long timestamp)
Sets the timestamp of this message

param
timestamp The timestamp