All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----JavaGroups.JavaStack.Protocol
|
+----JavaGroups.JavaStack.MessageProtocol
A protocol based on this template can send messages to all members and receive all, a single,
n, or none responses. Requests directed towards the protocol can be handled by overriding
method Handle.
Requests and responses are in the form of Messages, which would typically need to
contain information pertaining to the request/response, e.g. in the form of objects contained
in the message. To use remote method calls, use RpcProtocol instead.
Typical use of of a MessageProtocol would be when a protocol needs to interact with
its peer protocols at each of the members' protocol stacks. A simple protocol like fragmentation,
which does not need to interact with other instances of fragmentation, may simply subclass
Protocol instead.
mode responses.
public static final int FIRST
public static final int ALL
public static final int NONE
public static final int MAJORITY
public MessageProtocol()
public RspList CastMessage(Vector dests,
Message msg,
int mode,
long timeout)
mode responses. The responses are
returned in a response list, where each response is associated with its sender.
Uses GroupRequest.
mode responses
or timeout time.
Object and associated
to its sender.
public Object SendMessage(Message msg,
int mode,
long timeout) throws Timeout, Suspected
public Object Handle(Message req)
public void Send(Message msg) throws Exception
public Object Receive(long timeout) throws Exception
public final void Up(Event evt)
public final void Down(Event evt)
All Packages Class Hierarchy This Package Previous Next Index