Package org.jgroups.blocks.mux
Class MuxRpcDispatcher
java.lang.Object
org.jgroups.blocks.MessageDispatcher
org.jgroups.blocks.RpcDispatcher
org.jgroups.blocks.mux.MuxRpcDispatcher
- All Implemented Interfaces:
RequestHandler,ChannelListener
A multiplexed message dispatcher.
When used in conjunction with a MuxUpHandler, allows multiple dispatchers to use the same channel.
Usage:
Usage:
Channel c = new JChannel(...);
c.setUpHandler(new MuxUpHandler());
RpcDispatcher d1 = new MuxRpcDispatcher((short) 1, c, ...);
RpcDispatcher d2 = new MuxRpcDispatcher((short) 2, c, ...);
c.connect(...);
- Author:
- Bela Ban, Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.blocks.RpcDispatcher
RpcDispatcher.Marshaller, RpcDispatcher.Marshaller2, RpcDispatcher.MarshallerAdapter -
Field Summary
Fields inherited from class org.jgroups.blocks.RpcDispatcher
additionalChannelListeners, method_lookup, req_marshaller, rsp_marshaller, server_objFields inherited from class org.jgroups.blocks.MessageDispatcher
adapter, channel, corr, handler, hardware_multicast_supported, id, local_addr, log, members, membership_listener, msg_listener, prot_adapter, req_handler, transport_adapter -
Constructor Summary
ConstructorsConstructorDescriptionMuxRpcDispatcher(short scopeId) MuxRpcDispatcher(short scopeId, Channel channel, MessageListener messageListener, MembershipListener membershipListener, Object serverObject) -
Method Summary
Modifier and TypeMethodDescriptionprotected GroupRequestcast(Collection<Address> dests, Message msg, RequestOptions options, boolean blockForResults) protected RequestCorrelatorcreateRequestCorrelator(Object transport, RequestHandler handler, Address localAddr) voidstart()voidstop()Methods inherited from class org.jgroups.blocks.RpcDispatcher
addChannelListener, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethodsWithFuture, callRemoteMethodsWithFuture, callRemoteMethodsWithFuture, callRemoteMethodWithFuture, callRemoteMethodWithFuture, callRemoteMethodWithFuture, channelClosed, channelConnected, channelDisconnected, channelReconnected, channelShunned, correlatorStarted, getMarshaller, getMethodLookup, getName, getRequestMarshaller, getResponseMarshaller, getServerObject, handle, removeChannelListener, setMarshaller, setMethodLookup, setRequestMarshaller, setResponseMarshaller, setServerObjectMethods inherited from class org.jgroups.blocks.MessageDispatcher
castMessage, castMessage, castMessage, castMessage, castMessageWithFuture, castMessageWithFuture, done, getChannel, getConcurrentProcessing, getDeadlockDetection, getMembers, getMessageListener, getProtocolAdapter, installUpHandler, send, sendMessage, sendMessage, sendMessageWithFuture, sendMessageWithFuture, setChannel, setConcurrentProcessing, setDeadlockDetection, setMembershipListener, setMessageListener, setRequestHandler
-
Constructor Details
-
MuxRpcDispatcher
public MuxRpcDispatcher(short scopeId) -
MuxRpcDispatcher
public MuxRpcDispatcher(short scopeId, Channel channel, MessageListener messageListener, MembershipListener membershipListener, Object serverObject)
-
-
Method Details
-
createRequestCorrelator
protected RequestCorrelator createRequestCorrelator(Object transport, RequestHandler handler, Address localAddr) - Overrides:
createRequestCorrelatorin classMessageDispatcher
-
start
public void start()- Overrides:
startin classMessageDispatcher
-
stop
public void stop()- Overrides:
stopin classMessageDispatcher
-
cast
protected GroupRequest cast(Collection<Address> dests, Message msg, RequestOptions options, boolean blockForResults) - Overrides:
castin classMessageDispatcher
-