org.jboss.remoting.transport.multiplex
Class OutputMultiplexor

java.lang.Object
  extended by org.jboss.remoting.transport.multiplex.OutputMultiplexor

Deprecated. As of release 2.4.0 the multiplex transport will no longer be actively supported.

public class OutputMultiplexor
extends java.lang.Object

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.

  1. maxTimeSlice determines the maximum time devoted to writing bytes for a given virtual connection before going on to process another virtual connection, and
  2. 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

Author:
Ron Sigal

Nested Class Summary
static interface OutputMultiplexor.OutputMultiplexorClient
          Deprecated. 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
          Deprecated.  
protected static int BRACKETS_NONE
          Deprecated.  
protected static int HEADER_SIZE
          Deprecated.  
protected static org.jboss.logging.Logger log
          Deprecated.  
 
Constructor Summary
protected OutputMultiplexor(java.util.Map configuration)
          Deprecated.  
 
Method Summary
protected  org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message getaMessage(SocketId socketId, byte[] content, int brackets)
          Deprecated.  
 org.jboss.remoting.transport.multiplex.OutputMultiplexor.OutputThread getAnOutputThread()
          Deprecated.  
 int getMaxChunkSize()
          Deprecated.  
 int getMessagePoolSize()
          Deprecated.  
 int getMessageSize()
          Deprecated.  
 void register(OutputMultiplexor.OutputMultiplexorClient client)
          Deprecated. 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)
          Deprecated.  
 void setMaxChunkSize(int maxChunkSize)
          Deprecated.  
 void setMessagePoolSize(int messagePoolSize)
          Deprecated.  
 void setMessageSize(int messageSize)
          Deprecated.  
 void unregister(OutputMultiplexor.OutputMultiplexorClient client)
          Deprecated. Unregisters an OutputMultiplexorClient.
 void write(MultiplexingManager manager, SocketId socketId, byte[] content)
          Deprecated.  
 void write(MultiplexingManager manager, SocketId socketId, byte[] content, int brackets)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.jboss.logging.Logger log
Deprecated. 

BRACKETS_ALL

protected static final int BRACKETS_ALL
Deprecated. 
See Also:
Constant Field Values

BRACKETS_NONE

protected static final int BRACKETS_NONE
Deprecated. 
See Also:
Constant Field Values

HEADER_SIZE

protected static final int HEADER_SIZE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

OutputMultiplexor

protected OutputMultiplexor(java.util.Map configuration)
                     throws java.io.IOException
Deprecated. 
Parameters:
configuration -
Throws:
java.io.IOException
Method Detail

getAnOutputThread

public org.jboss.remoting.transport.multiplex.OutputMultiplexor.OutputThread getAnOutputThread()
Deprecated. 
Returns:

write

public void write(MultiplexingManager manager,
                  SocketId socketId,
                  byte[] content)
           throws java.io.IOException
Deprecated. 
Parameters:
manager -
socketId -
content -
Throws:
java.io.IOException

write

public void write(MultiplexingManager manager,
                  SocketId socketId,
                  byte[] content,
                  int brackets)
           throws java.io.IOException
Deprecated. 
Parameters:
manager -
socketId -
content -
Throws:
java.lang.InterruptedException
java.io.IOException

register

public void register(OutputMultiplexor.OutputMultiplexorClient client)
Deprecated. 
Allows a OutputMultiplexorClient to register to be notified when all of its bytes have been processed.

Parameters:
client -

unregister

public void unregister(OutputMultiplexor.OutputMultiplexorClient client)
Deprecated. 
Unregisters an OutputMultiplexorClient.

Parameters:
client -

getaMessage

protected org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message getaMessage(SocketId socketId,
                                                                                       byte[] content,
                                                                                       int brackets)
                                                                                throws java.io.IOException
Deprecated. 
Throws:
java.io.IOException

releaseMessage

protected void releaseMessage(org.jboss.remoting.transport.multiplex.OutputMultiplexor.Message m)
Deprecated. 

getMaxChunkSize

public int getMaxChunkSize()
Deprecated. 

setMaxChunkSize

public void setMaxChunkSize(int maxChunkSize)
Deprecated. 

getMessagePoolSize

public int getMessagePoolSize()
Deprecated. 

setMessagePoolSize

public void setMessagePoolSize(int messagePoolSize)
Deprecated. 

getMessageSize

public int getMessageSize()
Deprecated. 

setMessageSize

public void setMessageSize(int messageSize)
Deprecated. 


Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.