FileDocCategorySizeDatePackage
ChannelListener.javaAPI DocApache Tomcat 6.0.142419Fri Jul 20 04:20:32 BST 2007org.apache.catalina.tribes

ChannelListener

public interface ChannelListener

Title: ChannelListener

Description: An interface to listens to incoming messages from a channel

When a message is received, the Channel will invoke the channel listener in a conditional sequence. if ( listener.accept(msg,sender) ) listener.messageReceived(msg,sender);
A ChannelListener implementation MUST NOT return true on accept(Serializable, Member) if it doesn't intend to process the message. The channel can this way track whether a message was processed by an above application or if it was just received and forgot about, a featuer required to support message-response(RPC) calls
author
Filip Hanik
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public booleanaccept(java.io.Serializable msg, Member sender)
Invoked by the channel to determine if the listener will process this message or not.

param
msg Serializable
param
sender Member
return
boolean

public booleanequals(java.lang.Object listener)

param
listener Object
return
boolean
see
Object#equals(Object)

public inthashCode()

return
int
see
Object#hashCode(int)

public voidmessageReceived(java.io.Serializable msg, Member sender)
Receive a message from the channel

param
msg Serializable
param
sender - the source of the message