org.jgroups.blocks.mux
Class MuxMessageDispatcher
java.lang.Object
org.jgroups.blocks.MessageDispatcher
org.jgroups.blocks.mux.MuxMessageDispatcher
- All Implemented Interfaces:
- RequestHandler, ChannelListener
public class MuxMessageDispatcher
- extends MessageDispatcher
A multiplexed message dispatcher.
When used in conjunction with a MuxUpHandler, allows multiple dispatchers to use the same channel.
Usage:
Channel c = new JChannel(...);
c.setUpHandler(new MuxUpHandler());
MessageDispatcher d1 = new MuxMessageDispatcher((short) 1, c, ...);
MessageDispatcher d2 = new MuxMessageDispatcher((short) 2, c, ...);
c.connect(...);
- Author:
- Paul Ferraro
Fields inherited from class org.jgroups.blocks.MessageDispatcher |
async_anycasts, async_multicasts, async_unicasts, channel, channel_listeners, corr, hardware_multicast_supported, local_addr, log, members, membership_listener, msg_listener, probe_handler, prot_adapter, req_handler, sync_anycasts, sync_multicasts, sync_unicasts |
Methods inherited from class org.jgroups.blocks.MessageDispatcher |
addChannelListener, castMessage, castMessageWithFuture, channelClosed, channelConnected, channelDisconnected, correlatorStarted, done, getChannel, getMessageListener, getProtocolAdapter, handle, handleUpEvent, installUpHandler, removeChannelListener, sendMessage, sendMessageWithFuture, setChannel, setMembers, setMembershipListener, setMessageListener, setRequestHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MuxMessageDispatcher
public MuxMessageDispatcher(short scopeId)
MuxMessageDispatcher
public MuxMessageDispatcher(short scopeId,
Channel channel,
MessageListener messageListener,
MembershipListener membershipListener,
RequestHandler handler)
createRequestCorrelator
protected RequestCorrelator createRequestCorrelator(Protocol transport,
RequestHandler handler,
Address localAddr)
- Overrides:
createRequestCorrelator
in class MessageDispatcher
start
public void start()
- Overrides:
start
in class MessageDispatcher
stop
public void stop()
- Overrides:
stop
in class MessageDispatcher
cast
protected <T> GroupRequest<T> cast(java.util.Collection<Address> dests,
Message msg,
RequestOptions options,
boolean blockForResults)
throws java.lang.Exception
- Overrides:
cast
in class MessageDispatcher
- Throws:
java.lang.Exception
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.