org.apache.catalina.tribes.group
public class RpcChannel extends Object implements ChannelListener
Nested Class Summary | |
---|---|
static class | RpcChannel.RpcCollector
Class that holds all response. |
static class | RpcChannel.RpcCollectorKey |
Field Summary | |
---|---|
static int | ALL_REPLY |
static int | FIRST_REPLY |
protected static Log | log |
static int | MAJORITY_REPLY |
static int | NO_REPLY |
Constructor Summary | |
---|---|
RpcChannel(byte[] rpcId, Channel channel, RpcCallback callback)
Create an RPC channel. |
Method Summary | |
---|---|
boolean | accept(Serializable msg, Member sender) |
void | breakdown() |
protected static String | bToS(byte[] data) |
void | finalize() |
RpcCallback | getCallback() |
Channel | getChannel() |
byte[] | getRpcId() |
void | messageReceived(Serializable msg, Member sender) |
Response[] | send(Member[] destination, Serializable message, int rpcOptions, int channelOptions, long timeout)
Send a message and wait for the response. |
void | setCallback(RpcCallback callback) |
void | setChannel(Channel channel) |
void | setRpcId(byte[] rpcId) |
Parameters: rpcId - the unique Id for this RPC group channel Channel callback RpcCallback
Parameters: destination Member[] - the destination for the message, and the members you request a reply from message Serializable - the message you are sending out options int - FIRST_REPLY, MAJORITY_REPLY or ALL_REPLY timeout long - timeout in milliseconds, if no reply is received within this time null is returned
Returns: Response[] - an array of response objects.
Throws: ChannelException