Package org.apache.catalina.tribes
Interface ChannelListener
-
- All Known Subinterfaces:
ClusterDeployer
- All Known Implementing Classes:
AbstractReplicatedMap
,CloudMembershipProvider
,ClusterListener
,ClusterSessionListener
,DNSMembershipProvider
,FarmWarDeployer
,KubernetesMembershipProvider
,LazyReplicatedMap
,ReplicatedMap
,RpcChannel
,SimpleTcpCluster
,StaticMembershipProvider
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 onaccept(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- Version:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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
-
-
-
Method Detail
-
messageReceived
void messageReceived(java.io.Serializable msg, Member sender)
Receive a message from the channel- Parameters:
msg
- Serializablesender
- - the source of the message
-
accept
boolean accept(java.io.Serializable msg, Member sender)
Invoked by the channel to determine if the listener will process this message or not.- Parameters:
msg
- Serializablesender
- Member- Returns:
- boolean
-
equals
boolean equals(java.lang.Object listener)
- Overrides:
equals
in classjava.lang.Object
- Parameters:
listener
- Object- Returns:
- boolean
- See Also:
Object.equals(Object)
-
hashCode
int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- int
- See Also:
Object.hashCode()
-
-