Methods Summary |
---|
public void | fireInterceptorEvent(org.apache.catalina.tribes.ChannelInterceptor$InterceptorEvent event)
|
public Member | getLocalMember(boolean incAliveTime)Intercepts the code>Channel.getLocalMember(boolean) method
|
public Member | getMember(Member mbr)Intercepts the code>Channel.getMember(Member) method
|
public Member[] | getMembers()Intercepts the code>Channel.getMembers() method
|
public org.apache.catalina.tribes.ChannelInterceptor | getNext()Retrieve the next interceptor in the list
|
public int | getOptionFlag()An interceptor can react to a message based on a set bit on the
message options.
When a message is sent, the options can be retrieved from ChannelMessage.getOptions()
and if the bit is set, this interceptor will react to it.
A simple evaluation if an interceptor should react to the message would be:
boolean react = (getOptionFlag() == (getOptionFlag() & ChannelMessage.getOptions()));
The default option is 0, meaning there is no way for the application to trigger the
interceptor. The interceptor itself will decide.
|
public org.apache.catalina.tribes.ChannelInterceptor | getPrevious()Retrieve the previous interceptor in the list
|
public boolean | hasMembers()Intercepts the Channel.hasMembers() method
|
public void | heartbeat()The heartbeat() method gets invoked periodically
to allow interceptors to clean up resources, time out object and
perform actions that are unrelated to sending/receiving data.
|
public void | messageReceived(ChannelMessage data)the messageReceived is invoked when a message is received.
ChannelMessage.getAddress() is the sender, or the reply-to address
if it has been overwritten.
|
public void | sendMessage(Member[] destination, ChannelMessage msg, org.apache.catalina.tribes.group.InterceptorPayload payload)The sendMessage method is called when a message is being sent to one more destinations.
The interceptor can modify any of the parameters and then pass on the message down the stack by
invoking getNext().sendMessage(destination,msg,payload)
Alternatively the interceptor can stop the message from being sent by not invoking
getNext().sendMessage(destination,msg,payload)
If the message is to be sent asynchronous the application can be notified of completion and
errors by passing in an error handler attached to a payload object.
The ChannelMessage.getAddress contains Channel.getLocalMember, and can be overwritten
to simulate a message sent from another node.
|
public void | setNext(org.apache.catalina.tribes.ChannelInterceptor next)Set the next interceptor in the list of interceptors
|
public void | setOptionFlag(int flag)Sets the option flag
|
public void | setPrevious(org.apache.catalina.tribes.ChannelInterceptor previous)Set the previous interceptor in the list
|
public void | start(int svc)Starts up the channel. This can be called multiple times for individual services to start
The svc parameter can be the logical or value of any constants
|
public void | stop(int svc)Shuts down the channel. This can be called multiple times for individual services to shutdown
The svc parameter can be the logical or value of any constants
|