| org.jgroups.MessageListener
All known Subclasses: org.jgroups.blocks.DistributedTree, org.jgroups.demos.QuoteServer, org.jgroups.demos.wb.Whiteboard, org.jgroups.blocks.RpcDispatcherAnycastServerObject, org.jgroups.tests.PullPushTest, org.jgroups.tests.PullPushTestMux, org.jgroups.blocks.DistributedHashtable, org.jgroups.blocks.ReplicatedHashtable, org.jgroups.blocks.PullPushShunTest, org.jgroups.blocks.DistributedQueue, org.jgroups.blocks.VotingAdapter, org.jgroups.tests.PerfTest, org.jgroups.tests.GroupRequestPull, org.jgroups.blocks.ReplicatedTree,
MessageListener | public interface MessageListener (Code) | | Allows a listener to be notified when a message arrives.
Contrary to the pull-style of channels, some building blocks
(e.g.,
org.jgroups.blocks.PullPushAdapter ) provide an
event-like, push-style message delivery model.
In this case, the entity to be notified of message reception needs to
provide a callback to be invoked whenever a message has been received.
The MessageListener interface provides a method to do so.
|
Method Summary | |
byte[] | getState() Answers the group state; e.g., when joining. | void | receive(Message msg) Called when a message is received. | void | setState(byte[] state) Sets the group state; e.g., when joining. |
getState | byte[] getState()(Code) | | Answers the group state; e.g., when joining.
byte[] |
receive | void receive(Message msg)(Code) | | Called when a message is received.
Parameters: msg - |
setState | void setState(byte[] state)(Code) | | Sets the group state; e.g., when joining.
Parameters: state - |
|
|