RequestHandler
, ChannelListener
public class RpcDispatcher extends MessageDispatcher implements ChannelListener
Modifier and Type | Class | Description |
---|---|---|
static interface |
RpcDispatcher.Marshaller |
|
static interface |
RpcDispatcher.Marshaller2 |
|
static class |
RpcDispatcher.MarshallerAdapter |
Used to provide a Marshaller2 interface to a Marshaller.
|
Modifier and Type | Field | Description |
---|---|---|
protected java.util.List |
additionalChannelListeners |
|
protected MethodLookup |
method_lookup |
|
protected RpcDispatcher.Marshaller2 |
req_marshaller |
Marshaller to marshall requests at the caller and unmarshal requests at the receiver(s)
|
protected RpcDispatcher.Marshaller2 |
rsp_marshaller |
Marshaller to marshal responses at the receiver(s) and unmarshal responses at the caller
|
protected java.lang.Object |
server_obj |
adapter, channel, concurrent_processing, corr, deadlock_detection, handler, id, local_addr, log, members, membership_listener, msg_listener, prot_adapter, req_handler, transport_adapter
Constructor | Description |
---|---|
RpcDispatcher() |
|
RpcDispatcher(PullPushAdapter adapter,
java.io.Serializable id,
MessageListener l,
MembershipListener l2,
java.lang.Object server_obj) |
|
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(Channel channel,
MessageListener l,
MembershipListener l2,
java.lang.Object server_obj,
boolean deadlock_detection,
boolean concurrent_processing) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addChannelListener(ChannelListener l) |
Add a new channel listener to be notified on the channel's state change.
|
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,
MethodCall method_call,
int mode,
long timeout) |
|
java.lang.Object |
callRemoteMethod(Address dest,
MethodCall method_call,
int mode,
long timeout,
boolean oob) |
|
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.Class[] types,
int mode,
long timeout,
boolean use_anycasting) |
|
RspList |
callRemoteMethods(java.util.Vector dests,
java.lang.String method_name,
java.lang.Object[] args,
java.lang.Class[] types,
int mode,
long timeout,
boolean use_anycasting,
RspFilter filter) |
|
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[] args,
java.lang.String[] signature,
int mode,
long timeout,
boolean use_anycasting) |
|
RspList |
callRemoteMethods(java.util.Vector dests,
MethodCall method_call,
int mode,
long timeout) |
|
RspList |
callRemoteMethods(java.util.Vector dests,
MethodCall method_call,
int mode,
long timeout,
boolean use_anycasting) |
|
RspList |
callRemoteMethods(java.util.Vector dests,
MethodCall method_call,
int mode,
long timeout,
boolean use_anycasting,
boolean oob) |
|
RspList |
callRemoteMethods(java.util.Vector dests,
MethodCall method_call,
int mode,
long timeout,
boolean use_anycasting,
boolean oob,
RspFilter filter) |
|
RspList |
castMessage(java.util.Vector dests,
Message msg,
int mode,
long timeout) |
|
void |
channelClosed(Channel channel) |
|
void |
channelConnected(Channel channel) |
|
void |
channelDisconnected(Channel channel) |
|
void |
channelReconnected(Address new_addr) |
|
void |
channelShunned() |
|
protected void |
correlatorStarted() |
|
RpcDispatcher.Marshaller |
getMarshaller() |
|
MethodLookup |
getMethodLookup() |
|
java.lang.String |
getName() |
|
RpcDispatcher.Marshaller |
getRequestMarshaller() |
|
RpcDispatcher.Marshaller |
getResponseMarshaller() |
|
java.lang.Object |
getServerObject() |
|
java.lang.Object |
handle(Message req) |
Message contains MethodCall.
|
boolean |
removeChannelListener(ChannelListener l) |
|
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) |
|
void |
setRequestMarshaller(RpcDispatcher.Marshaller m) |
|
void |
setResponseMarshaller(RpcDispatcher.Marshaller m) |
|
void |
setServerObject(java.lang.Object server_obj) |
castMessage, castMessage, castMessage, done, getChannel, getConcurrentProcessing, getDeadlockDetection, getMembers, getMessageListener, send, setChannel, setConcurrentProcessing, setDeadlockDetection, setMembershipListener, setMessageListener, setRequestHandler, start, stop
protected java.lang.Object server_obj
protected RpcDispatcher.Marshaller2 req_marshaller
protected RpcDispatcher.Marshaller2 rsp_marshaller
protected final java.util.List additionalChannelListeners
protected MethodLookup method_lookup
public RpcDispatcher()
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(Channel channel, MessageListener l, MembershipListener l2, java.lang.Object server_obj, boolean deadlock_detection, boolean concurrent_processing)
public RpcDispatcher(PullPushAdapter adapter, java.io.Serializable id, MessageListener l, MembershipListener l2, java.lang.Object server_obj)
public java.lang.String getName()
public RpcDispatcher.Marshaller getRequestMarshaller()
public void setRequestMarshaller(RpcDispatcher.Marshaller m)
public RpcDispatcher.Marshaller getResponseMarshaller()
public void setResponseMarshaller(RpcDispatcher.Marshaller m)
public RpcDispatcher.Marshaller getMarshaller()
public void setMarshaller(RpcDispatcher.Marshaller m)
public java.lang.Object getServerObject()
public void setServerObject(java.lang.Object server_obj)
public MethodLookup getMethodLookup()
public void setMethodLookup(MethodLookup method_lookup)
public RspList castMessage(java.util.Vector dests, Message msg, int mode, long timeout)
castMessage
in class MessageDispatcher
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, 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.Class[] types, int mode, long timeout, boolean use_anycasting)
public RspList callRemoteMethods(java.util.Vector dests, java.lang.String method_name, java.lang.Object[] args, java.lang.Class[] types, int mode, long timeout, boolean use_anycasting, RspFilter filter)
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, java.lang.String method_name, java.lang.Object[] args, java.lang.String[] signature, int mode, long timeout, boolean use_anycasting)
public RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout)
public RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout, boolean use_anycasting)
public RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout, boolean use_anycasting, boolean oob)
public RspList callRemoteMethods(java.util.Vector dests, MethodCall method_call, int mode, long timeout, boolean use_anycasting, boolean oob, RspFilter filter)
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 java.lang.Throwable
java.lang.Throwable
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 java.lang.Throwable
java.lang.Throwable
public java.lang.Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) throws java.lang.Throwable
java.lang.Throwable
public java.lang.Object callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout, boolean oob) throws java.lang.Throwable
java.lang.Throwable
protected void correlatorStarted()
correlatorStarted
in class MessageDispatcher
public java.lang.Object handle(Message req)
handle
in interface RequestHandler
handle
in class MessageDispatcher
public boolean addChannelListener(ChannelListener l)
public boolean removeChannelListener(ChannelListener l)
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
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.