public interface ChannelListener
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 feature required
to support message-response(RPC) calls
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.io.Serializable msg,
Member sender)
Invoked by the channel to determine if the listener will process this message or not.
|
boolean |
equals(java.lang.Object listener) |
int |
hashCode() |
void |
messageReceived(java.io.Serializable msg,
Member sender)
Receive a message from the channel
|
void messageReceived(java.io.Serializable msg,
Member sender)
msg - Serializablesender - - the source of the messageboolean accept(java.io.Serializable msg,
Member sender)
msg - Serializablesender - Memberboolean equals(java.lang.Object listener)
equals in class java.lang.Objectlistener - ObjectObject.equals(Object)int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()Copyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.