|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.transport.multiplex.OutputMultiplexor
public class OutputMultiplexor
OutputMultiplexor
is one of the key Multiplex classes, responsible for
multiplexing multiple byte streams that share a single TCP connection. It has an
inner class that performs this function.
The data stream created here consists of a sequence of packets, each consisting of a header, with the format:
byte : | version (current version is 0) |
int : | destination virtual socket id |
short : | number of data bytes to follow |
followed by the number of data bytes specified in the header.
OutputMultiplexor
has two fairness constraints that prevent one virtual stream from
starving the others.
maxTimeSlice
determines the maximum time devoted to writing bytes for a
given virtual connection before going on to process another virtual connection, and
maxDataSlice
determines the maximum number of bytes written for a given
virtual connection before going on to process another virtual connection.
For additional information about configuring OutputMultiplexor
, please see the
documentation at labs.jbos.org.
Copyright (c) 2005
Nested Class Summary | |
---|---|
static interface |
OutputMultiplexor.OutputMultiplexorClient
A class implementing this interface can register to be notified when all of its bytes have been processed. |
Field Summary | |
---|---|
protected static int |
BRACKETS_ALL
|
protected static int |
BRACKETS_NONE
|
protected static int |
HEADER_SIZE
|
protected static org.jboss.logging.Logger |
log
|
Constructor Summary | |
---|---|
protected |
OutputMultiplexor(java.util.Map configuration)
|
Method Summary | |
---|---|
protected org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message |
getaMessage(SocketId socketId,
byte[] content,
int brackets)
|
org.jboss.remoting.transport.multiplex.OutputMultiplexor.OutputThread |
getAnOutputThread()
|
int |
getMaxChunkSize()
|
int |
getMessagePoolSize()
|
int |
getMessageSize()
|
void |
register(OutputMultiplexor.OutputMultiplexorClient client)
Allows a OutputMultiplexorClient to register to be notified when all
of its bytes have been processed. |
protected void |
releaseMessage(org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message m)
|
void |
setMaxChunkSize(int maxChunkSize)
|
void |
setMessagePoolSize(int messagePoolSize)
|
void |
setMessageSize(int messageSize)
|
void |
unregister(OutputMultiplexor.OutputMultiplexorClient client)
Unregisters an OutputMultiplexorClient . |
void |
write(MultiplexingManager manager,
SocketId socketId,
byte[] content)
|
void |
write(MultiplexingManager manager,
SocketId socketId,
byte[] content,
int brackets)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.jboss.logging.Logger log
protected static final int BRACKETS_ALL
protected static final int BRACKETS_NONE
protected static final int HEADER_SIZE
Constructor Detail |
---|
protected OutputMultiplexor(java.util.Map configuration) throws java.io.IOException
configuration
-
java.io.IOException
Method Detail |
---|
public org.jboss.remoting.transport.multiplex.OutputMultiplexor.OutputThread getAnOutputThread()
public void write(MultiplexingManager manager, SocketId socketId, byte[] content) throws java.io.IOException
manager
- socketId
- content
-
java.io.IOException
public void write(MultiplexingManager manager, SocketId socketId, byte[] content, int brackets) throws java.io.IOException
manager
- socketId
- content
-
java.lang.InterruptedException
java.io.IOException
public void register(OutputMultiplexor.OutputMultiplexorClient client)
OutputMultiplexorClient
to register to be notified when all
of its bytes have been processed.
client
- public void unregister(OutputMultiplexor.OutputMultiplexorClient client)
OutputMultiplexorClient
.
client
- protected org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message getaMessage(SocketId socketId, byte[] content, int brackets) throws java.io.IOException
java.io.IOException
protected void releaseMessage(org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message m)
public int getMaxChunkSize()
public void setMaxChunkSize(int maxChunkSize)
public int getMessagePoolSize()
public void setMessagePoolSize(int messagePoolSize)
public int getMessageSize()
public void setMessageSize(int messageSize)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |