| java.lang.Object org.jgroups.blocks.MessageDispatcher org.jgroups.blocks.RpcDispatcher
RpcDispatcher | public class RpcDispatcher extends MessageDispatcher implements ChannelListener(Code) | | This class allows a programmer to invoke remote methods in all (or single)
group members and optionally wait for the return value(s).
An application will typically create a channel and layer the
RpcDispatcher building block on top of it, which allows it to
dispatch remote methods (client role) and at the same time be
called by other members (server role).
This class is derived from MessageDispatcher.
Is the equivalent of RpcProtocol on the application rather than protocol level.
author: Bela Ban |
Inner Class :public interface Marshaller | |
Constructor Summary | |
public | RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj) | public | RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj, boolean deadlock_detection) | public | RpcDispatcher(Channel channel, MessageListener l, MembershipListener l2, Object server_obj, boolean deadlock_detection, boolean concurrent_processing) | public | RpcDispatcher(PullPushAdapter adapter, Serializable id, MessageListener l, MembershipListener l2, Object server_obj) |
Method Summary | |
public boolean | addChannelListener(ChannelListener l) Add a new channel listener to be notified on the channel's state change. | public Object | callRemoteMethod(Address dest, String method_name, Object[] args, Class[] types, int mode, long timeout) | public Object | callRemoteMethod(Address dest, String method_name, Object[] args, String[] signature, int mode, long timeout) | public Object | callRemoteMethod(Address dest, MethodCall method_call, int mode, long timeout) | public RspList | callRemoteMethods(Vector dests, String method_name, Object[] args, Class[] types, int mode, long timeout) | public RspList | callRemoteMethods(Vector dests, String method_name, Object[] args, Class[] types, int mode, long timeout, boolean use_anycasting) | public RspList | callRemoteMethods(Vector dests, String method_name, Object[] args, String[] signature, int mode, long timeout) | public RspList | callRemoteMethods(Vector dests, String method_name, Object[] args, String[] signature, int mode, long timeout, boolean use_anycasting) | public RspList | callRemoteMethods(Vector dests, MethodCall method_call, int mode, long timeout) | public RspList | callRemoteMethods(Vector dests, MethodCall method_call, int mode, long timeout, boolean use_anycasting) | public RspList | castMessage(Vector dests, Message msg, int mode, long timeout) | public void | channelClosed(Channel channel) | public void | channelConnected(Channel channel) | public void | channelDisconnected(Channel channel) | public void | channelReconnected(Address new_addr) | public void | channelShunned() | protected void | correlatorStarted() | public Marshaller | getMarshaller() | public MethodLookup | getMethodLookup() | public String | getName() | public Marshaller | getRequestMarshaller() | public Marshaller | getResponseMarshaller() | public Object | getServerObject() | public Object | handle(Message req) Message contains MethodCall. | public boolean | removeChannelListener(ChannelListener l) | public Object | sendMessage(Message msg, int mode, long timeout) | public void | setMarshaller(Marshaller m) | public void | setMethodLookup(MethodLookup method_lookup) | public void | setRequestMarshaller(Marshaller m) | public void | setResponseMarshaller(Marshaller m) | public void | setServerObject(Object server_obj) |
additionalChannelListeners | final protected List additionalChannelListeners(Code) | | |
req_marshaller | protected Marshaller req_marshaller(Code) | | Marshaller to marshall requests at the caller and unmarshal requests at the receiver(s)
|
rsp_marshaller | protected Marshaller rsp_marshaller(Code) | | Marshaller to marshal responses at the receiver(s) and unmarshal responses at the caller
|
addChannelListener | public boolean addChannelListener(ChannelListener l)(Code) | | Add a new channel listener to be notified on the channel's state change.
true if the listener was added or false if the listener was already in the list. |
channelConnected | public void channelConnected(Channel channel)(Code) | | |
channelDisconnected | public void channelDisconnected(Channel channel)(Code) | | |
channelReconnected | public void channelReconnected(Address new_addr)(Code) | | |
channelShunned | public void channelShunned()(Code) | | |
correlatorStarted | protected void correlatorStarted()(Code) | | |
getMarshaller | public Marshaller getMarshaller()(Code) | | |
getRequestMarshaller | public Marshaller getRequestMarshaller()(Code) | | |
getResponseMarshaller | public Marshaller getResponseMarshaller()(Code) | | |
handle | public Object handle(Message req)(Code) | | Message contains MethodCall. Execute it against *this* object and return result.
Use MethodCall.invoke() to do this. Return result.
|
removeChannelListener | public boolean removeChannelListener(ChannelListener l)(Code) | | true if the channel was removed indeed. |
setMarshaller | public void setMarshaller(Marshaller m)(Code) | | |
setRequestMarshaller | public void setRequestMarshaller(Marshaller m)(Code) | | |
setResponseMarshaller | public void setResponseMarshaller(Marshaller m)(Code) | | |
setServerObject | public void setServerObject(Object server_obj)(Code) | | |
Methods inherited from org.jgroups.blocks.MessageDispatcher | public RspList castMessage(Vector dests, Message msg, int mode, long timeout)(Code)(Java Doc) public RspList castMessage(Vector dests, Message msg, int mode, long timeout, boolean use_anycasting)(Code)(Java Doc) public void castMessage(Vector dests, long req_id, Message msg, RspCollector coll)(Code)(Java Doc) protected void correlatorStarted()(Code)(Java Doc) public void done(long req_id)(Code)(Java Doc) public Channel getChannel()(Code)(Java Doc) protected Collection getMembers()(Code)(Java Doc) public MessageListener getMessageListener()(Code)(Java Doc) public Object handle(Message msg)(Code)(Java Doc) public void send(Message msg) throws ChannelNotConnectedException, ChannelClosedException(Code)(Java Doc) public Object sendMessage(Message msg, int mode, long timeout) throws TimeoutException, SuspectedException(Code)(Java Doc) public void setConcurrentProcessing(boolean flag)(Code)(Java Doc) public void setDeadlockDetection(boolean flag)(Code)(Java Doc) final public void setMembershipListener(MembershipListener l)(Code)(Java Doc) final public void setMessageListener(MessageListener l)(Code)(Java Doc) final public void setRequestHandler(RequestHandler rh)(Code)(Java Doc) final public void start()(Code)(Java Doc) public void stop()(Code)(Java Doc)
|
|
|