|
Apache Tomcat 7.0.42 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.tribes.group.RpcChannel
public class RpcChannel
A channel to handle RPC messaging
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
|
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)
Invoked by the channel to determine if the listener will process this message or not. |
void |
breakdown()
|
protected static String |
bToS(byte[] data)
Deprecated. Unused - will be removed in Tomcat 8.0.x |
void |
finalize()
|
RpcCallback |
getCallback()
|
Channel |
getChannel()
|
int |
getReplyMessageOptions()
|
byte[] |
getRpcId()
|
void |
messageReceived(Serializable msg,
Member sender)
Receive a message from the channel |
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 |
setReplyMessageOptions(int replyMessageOptions)
|
void |
setRpcId(byte[] rpcId)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.catalina.tribes.ChannelListener |
---|
equals, hashCode |
Field Detail |
---|
public static final int FIRST_REPLY
public static final int MAJORITY_REPLY
public static final int ALL_REPLY
public static final int NO_REPLY
Constructor Detail |
---|
public RpcChannel(byte[] rpcId, Channel channel, RpcCallback callback)
rpcId
- - the unique Id for this RPC groupchannel
- Channelcallback
- RpcCallbackMethod Detail |
---|
public Response[] send(Member[] destination, Serializable message, int rpcOptions, int channelOptions, long timeout) throws ChannelException
destination
- Member[] - the destination for the message, and the members you request a reply frommessage
- Serializable - the message you are sending outrpcOptions
- int - FIRST_REPLY, MAJORITY_REPLY or ALL_REPLYchannelOptions
- channel sender optionstimeout
- long - timeout in milliseconds, if no reply is received within this time null is returned
ChannelException
public void messageReceived(Serializable msg, Member sender)
ChannelListener
messageReceived
in interface ChannelListener
msg
- Serializablesender
- - the source of the messagepublic void breakdown()
public void finalize()
finalize
in class Object
public boolean accept(Serializable msg, Member sender)
ChannelListener
accept
in interface ChannelListener
msg
- Serializablesender
- Member
public Channel getChannel()
public RpcCallback getCallback()
public byte[] getRpcId()
public void setChannel(Channel channel)
public void setCallback(RpcCallback callback)
public void setRpcId(byte[] rpcId)
public int getReplyMessageOptions()
public void setReplyMessageOptions(int replyMessageOptions)
@Deprecated protected static String bToS(byte[] data)
|
Apache Tomcat 7.0.42 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |