| java.lang.Object org.jgroups.mux.Multiplexer
Multiplexer | public class Multiplexer implements UpHandler(Code) | | Used for dispatching incoming messages. The Multiplexer implements UpHandler and registers with the associated
JChannel (there can only be 1 Multiplexer per JChannel). When up() is called with a message, the header of the
message is removed and the MuxChannel corresponding to the header's service ID is retrieved from the map,
and MuxChannel.up() is called with the message.
author: Bela Ban version: $Id: Multiplexer.java,v 1.35.2.4 2007/02/12 18:42:34 vlada Exp $ |
Method Summary | |
public void | addServiceIfNotPresent(String id, MuxChannel ch) | public void | blockOk() | public boolean | close() | public void | closeAll() | public Channel | createMuxChannel(JChannelFactory f, String id, String stack_name) | public void | disconnect() | public void | fetchServiceInformation() Fetches the map of services and hosts from the coordinator (Multiplexer). | public Set | getApplicationIds() | public Set | getServiceIds() | public View | getServiceView(String service_id) | public long | getServicesResponseTimeout() | public synchronized boolean | getState(Address target, String id, long timeout) | public Address | getStateProvider(Address preferredTarget, String service_id) Returns an Address of a state provider for a given service_id.
If preferredTarget is a member of a service view for a given service_id
then preferredTarget is returned. | public synchronized void | registerForStateTransfer(String appl_id, String substate_id) | public MuxChannel | remove(String id) | public void | sendServiceDownMessage(String service, Address host, boolean bypassFlush) | public void | sendServiceUpMessage(String service, Address host, boolean bypassFlush) | public void | setServicesResponseTimeout(long services_rsp_timeout) | public boolean | shutdown() | public boolean | stateTransferListenersPresent() | public void | unregister(String appl_id) | public void | up(Event evt) |
SEPARATOR_LEN | final static short SEPARATOR_LEN(Code) | | |
Multiplexer | public Multiplexer()(Code) | | |
blockOk | public void blockOk()(Code) | | Called by a MuxChannel when BLOCK_OK is sent down
|
close | public boolean close()(Code) | | |
closeAll | public void closeAll()(Code) | | |
disconnect | public void disconnect()(Code) | | Closes the underlying JChannel if all MuxChannels have been disconnected
|
fetchServiceInformation | public void fetchServiceInformation() throws Exception(Code) | | Fetches the map of services and hosts from the coordinator (Multiplexer). No-op if we are the coordinator
|
getApplicationIds | public Set getApplicationIds()(Code) | | The set of service IDs |
getServiceIds | public Set getServiceIds()(Code) | | |
getServiceView | public View getServiceView(String service_id)(Code) | | Returns a copy of the current view minus the nodes on which service service_id is not running
Parameters: service_id - The service view |
getServicesResponseTimeout | public long getServicesResponseTimeout()(Code) | | |
getStateProvider | public Address getStateProvider(Address preferredTarget, String service_id)(Code) | | Returns an Address of a state provider for a given service_id.
If preferredTarget is a member of a service view for a given service_id
then preferredTarget is returned. Otherwise, service view coordinator is
returned if such node exists. If service view is empty for a given service_id
null is returned.
Parameters: preferredTarget - Parameters: service_id - |
registerForStateTransfer | public synchronized void registerForStateTransfer(String appl_id, String substate_id)(Code) | | |
setServicesResponseTimeout | public void setServicesResponseTimeout(long services_rsp_timeout)(Code) | | |
shutdown | public boolean shutdown()(Code) | | |
stateTransferListenersPresent | public boolean stateTransferListenersPresent()(Code) | | |
|
|