UpHandler
public class Multiplexer extends java.lang.Object implements UpHandler
The multiplexer is essentially a building block residing on top of a JChannel providing multiplexing functionality to N instances of MuxChannel. Since MuxChannel extends the JGroups JChannel class, user applications are completely unaware of this change in the underlying plumbing.
Each JGroups application sharing a channel through a multiplexer has to create a MuxChannel with a unique application id. The multiplexer keeps track of all registered applications and tags messages belonging to a specific application with that id for sent messages. When receiving a message from a remote peer, the multiplexer will dispatch a message to the appropriate MuxChannel depending on the id attached to the message.
MuxChannel
,
Channel
Modifier and Type | Field | Description |
---|---|---|
protected long |
service_ack_timeout |
Constructor | Description |
---|---|
Multiplexer(JChannel channel) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
close() |
|
void |
closeAll() |
|
Channel |
createMuxChannel(java.lang.String id,
java.lang.String stack_name) |
|
protected java.util.concurrent.ThreadPoolExecutor |
createThreadPool() |
|
java.util.Set |
getApplicationIds() |
Deprecated.
Use ${link #getServiceIds()} instead
|
long |
getServiceAckTimeout() |
|
java.util.Set<java.lang.String> |
getServiceIds() |
|
long |
getServicesResponseTimeout() |
|
void |
registerForStateTransfer(java.lang.String appl_id,
java.lang.String substate_id) |
|
protected MuxChannel |
removeService(java.lang.String id) |
|
void |
setServiceAckTimeout(long service_ack_timeout) |
|
void |
setServicesResponseTimeout(long services_rsp_timeout) |
|
protected void |
shutdownThreadPool() |
|
java.lang.Object |
up(Event evt) |
Remove mux header and dispatch to correct MuxChannel
|
public Multiplexer(JChannel channel)
public java.util.Set getApplicationIds()
public java.util.Set<java.lang.String> getServiceIds()
public long getServicesResponseTimeout()
public void setServicesResponseTimeout(long services_rsp_timeout)
public long getServiceAckTimeout()
public void setServiceAckTimeout(long service_ack_timeout)
public void registerForStateTransfer(java.lang.String appl_id, java.lang.String substate_id)
protected java.util.concurrent.ThreadPoolExecutor createThreadPool()
protected void shutdownThreadPool()
public java.lang.Object up(Event evt)
public Channel createMuxChannel(java.lang.String id, java.lang.String stack_name) throws java.lang.Exception
java.lang.Exception
protected MuxChannel removeService(java.lang.String id)
public boolean close()
public void closeAll()
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.