Apache Tomcat 6.0.53

org.apache.catalina.tribes
Interface ChannelMessage

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ChannelData

public interface ChannelMessage
extends java.io.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

Method Summary
 java.lang.Object clone()
          Shallow clone, what gets cloned depends on the implementation
 java.lang.Object deepclone()
          Deep clone, all fields MUST get cloned
 Member getAddress()
          Get the address that this message originated from.
 XByteBuffer getMessage()
          returns the byte buffer that contains the actual message payload
 int getOptions()
          The message options is a 32 bit flag set that triggers interceptors and message behavior.
 long getTimestamp()
          Timestamp of when the message was created.
 byte[] getUniqueId()
          Each message must have a globally unique Id.
 void setAddress(Member member)
          Sets the source or reply-to address of this message
 void setMessage(XByteBuffer buf)
          The byte buffer that contains the actual message payload
 void setOptions(int options)
          sets the option bits for this message
 void setTimestamp(long timestamp)
          Sets the timestamp of this message
 

Method Detail

getAddress

Member getAddress()
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.

Returns:
the source or reply-to address of this message

setAddress

void setAddress(Member member)
Sets the source or reply-to address of this message

Parameters:
member - Member

getTimestamp

long getTimestamp()
Timestamp of when the message was created.

Returns:
long timestamp in milliseconds

setTimestamp

void setTimestamp(long timestamp)
Sets the timestamp of this message

Parameters:
timestamp - The timestamp

getUniqueId

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

Returns:
byte

setMessage

void setMessage(XByteBuffer buf)
The byte buffer that contains the actual message payload

Parameters:
buf - XByteBuffer

getMessage

XByteBuffer getMessage()
returns the byte buffer that contains the actual message payload

Returns:
XByteBuffer

getOptions

int 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()

setOptions

void setOptions(int options)
sets the option bits for this message

Parameters:
options - int
See Also:
getOptions()

clone

java.lang.Object clone()
Shallow clone, what gets cloned depends on the implementation

Returns:
ChannelMessage

deepclone

java.lang.Object deepclone()
Deep clone, all fields MUST get cloned

Returns:
ChannelMessage

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.