|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.javagroups.blocks.MessageDispatcher | +--org.javagroups.blocks.RpcDispatcher
Dispatches and receives remote group method calls. Is the equivalent of RpcProtocol on the application rather than protocol level.
Nested Class Summary | |
---|---|
static interface |
RpcDispatcher.Marshaller
|
Field Summary | |
---|---|
protected RpcDispatcher.Marshaller |
marshaller
|
protected java.lang.Object |
server_obj
|
Fields inherited from class org.javagroups.blocks.MessageDispatcher |
---|
adapter, channel, corr, deadlock_detection, id, local_addr, members, membership_listener, msg_listener, prot_adapter, req_handler, transport_adapter |
Constructor Summary | |
---|---|
RpcDispatcher(Channel channel,
MessageListener l,
MembershipListener l2,
java.lang.Object server_obj)
|
|
RpcDispatcher(Channel channel,
MessageListener l,
MembershipListener l2,
java.lang.Object server_obj,
boolean deadlock_detection)
|
|
RpcDispatcher(PullPushAdapter adapter,
java.io.Serializable id,
MessageListener l,
MembershipListener l2,
java.lang.Object server_obj)
|
Method Summary | |
---|---|
java.lang.Object |
callRemoteMethod(Address dest,
MethodCall method_call,
int mode,
long timeout)
|
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
int mode,
long timeout)
Deprecated. use callRemoteMethod(Address,MethodCall, int, long); |
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
java.lang.Object[] args,
java.lang.Class[] types,
int mode,
long timeout)
|
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
java.lang.Object[] args,
java.lang.String[] signature,
int mode,
long timeout)
|
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
java.lang.Object arg1,
int mode,
long timeout)
Deprecated. use callRemoteMethod(Address,MethodCall, int, long); |
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
java.lang.Object arg1,
java.lang.Object arg2,
int mode,
long timeout)
Deprecated. use callRemoteMethod(Address,MethodCall, int, long); |
java.lang.Object |
callRemoteMethod(Address dest,
java.lang.String method_name,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
int mode,
long timeout)
Deprecated. use callRemoteMethod(Address,MethodCall, int, long); |
RspList |
callRemoteMethods(java.util.Vector dests,
MethodCall method_call,
int mode,
long timeout)
|
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
int mode,
long timeout)
Deprecated. use callRemoteMethods(Vector,MethodCall, int, long); |
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object[] args,
java.lang.Class[] types,
int mode,
long timeout)
|
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object[] args,
java.lang.String[] signature,
int mode,
long timeout)
|
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object arg1,
int mode,
long timeout)
Deprecated. use callRemoteMethods(Vector,MethodCall, int, long); |
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object arg1,
java.lang.Object arg2,
int mode,
long timeout)
Deprecated. use callRemoteMethods(Vector,MethodCall, int, long); |
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
int mode,
long timeout)
Deprecated. use callRemoteMethods(Vector,MethodCall, int, long); |
RspList |
castMessage(java.util.Vector dests,
Message msg,
int mode,
long timeout)
Cast a message to all members, and wait for mode responses. |
void |
channelClosed(Channel channel)
|
void |
channelConnected(Channel channel)
|
void |
channelDisconnected(Channel channel)
|
void |
channelReconnected(Address new_addr)
|
void |
channelShunned()
|
RpcDispatcher.Marshaller |
getMarshaller()
|
MethodLookup |
getMethodLookup()
|
java.lang.String |
getName()
|
java.lang.Object |
handle(Message req)
Message contains MethodCall. |
java.lang.Object |
sendMessage(Message msg,
int mode,
long timeout)
Sends a message to a single member (destination = msg.dest) and returns the response. |
void |
setMarshaller(RpcDispatcher.Marshaller m)
|
void |
setMethodLookup(MethodLookup method_lookup)
|
Methods inherited from class org.javagroups.blocks.MessageDispatcher |
---|
castMessage, done, finalize, send, setDeadlockDetection, setMembershipListener, setMessageListener, setRequestHandler, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object server_obj
protected RpcDispatcher.Marshaller marshaller
Constructor Detail |
public RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, java.lang.Object server_obj)
public RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, java.lang.Object server_obj, boolean deadlock_detection)
public RpcDispatcher(PullPushAdapter adapter, java.io.Serializable id, MessageListener l, MembershipListener l2, java.lang.Object server_obj)
Method Detail |
public java.lang.String getName()
public MethodLookup getMethodLookup()
public void setMethodLookup(MethodLookup method_lookup)
public void setMarshaller(RpcDispatcher.Marshaller m)
public RpcDispatcher.Marshaller getMarshaller()
public RspList castMessage(java.util.Vector dests, Message msg, int mode, long timeout)
MessageDispatcher
mode
responses. The responses are
returned in a response list, where each response is associated with its sender.
Uses GroupRequest
.
castMessage
in class MessageDispatcher
dests
- The members to which the message is to be sent. If it is null, then the message
is sent to all membersmsg
- The message to be sent to n membersmode
- Defined in GroupRequest
. The number of responses to wait for:
timeout
- If 0: wait forever. Otherwise, wait for mode
responses
or timeout time.
Object
and associated
to its sender.public java.lang.Object sendMessage(Message msg, int mode, long timeout) throws TimeoutException, SuspectedException
MessageDispatcher
sendMessage
in class MessageDispatcher
TimeoutException
SuspectedException
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, int mode, long timeout)
callRemoteMethod(Address,MethodCall, int, long)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object arg1, int mode, long timeout)
callRemoteMethod(Address,MethodCall, int, long)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object arg1, java.lang.Object arg2, int mode, long timeout)
callRemoteMethod(Address,MethodCall, int, long)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, int mode, long timeout)
callRemoteMethod(Address,MethodCall, int, long)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types, int mode, long timeout)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature, int mode, long timeout)
public RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout)
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
callRemoteMethod(Address,MethodCall, int, long)
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object arg1, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
callRemoteMethod(Address,MethodCall, int, long)
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object arg1, java.lang.Object arg2, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
callRemoteMethod(Address,MethodCall, int, long)
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
callRemoteMethod(Address,MethodCall, int, long)
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
public java.lang.Object callRemoteMethod(Address dest, java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
public java.lang.Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) throws TimeoutException, SuspectedException
TimeoutException
SuspectedException
public java.lang.Object handle(Message req)
handle
in interface RequestHandler
handle
in class MessageDispatcher
public void channelConnected(Channel channel)
channelConnected
in interface ChannelListener
public void channelDisconnected(Channel channel)
channelDisconnected
in interface ChannelListener
public void channelClosed(Channel channel)
channelClosed
in interface ChannelListener
public void channelShunned()
channelShunned
in interface ChannelListener
public void channelReconnected(Address new_addr)
channelReconnected
in interface ChannelListener
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |