org.jboss.remoting.transport.multiplex
Class InputMultiplexor

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

public class InputMultiplexor
extends java.lang.Object

InputMultiplexor is one of the key Multiplex classes, responsible for demultiplexing multiple byte streams sharing a single TCP connection. It has two inner classes which can perform this function. MultiGroupInputThread can perform demultiplexing for any number of NIO sockets, taking advantage of the Selector facility. For non-NIO sockets, notably SSL sockets, SingleGroupInputThread handles demultiplexing for a single socket.

The data stream, created at the other end of the TCP connection by the OutputMultiplexor class, consists of a sequence of packets, each consisting of a header, giving version, destination virtual socket, and number of bytes. followed by the specified number of data bytes. (See OutputMultiplexor for the header format. Each of the demultiplexing thread classes reads a header and transfers the following bytes to the input stream of the target virtual socket.

Copyright (c) 2005

Author:
Ron Sigal

Nested Class Summary
 class InputMultiplexor.MultiGroupInputThread
           
 
Field Summary
protected static org.jboss.logging.Logger log
           
 
Constructor Summary
InputMultiplexor(java.util.Map configuration)
           
 
Method Summary
 InputMultiplexor.MultiGroupInputThread getaMultiGroupInputThread()
          Returns a MultiGroupInputThread designed to handle multiple virtual socket groups.
 org.jboss.remoting.transport.multiplex.InputMultiplexor.SingleGroupInputThread getaSingleGroupInputThread(MultiplexingManager manager, java.net.Socket socket, java.io.OutputStream os)
          Returns a SingleGroupInputThread designed to handle a single virtual socket group.
 
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
Constructor Detail

InputMultiplexor

public InputMultiplexor(java.util.Map configuration)
Method Detail

getaMultiGroupInputThread

public InputMultiplexor.MultiGroupInputThread getaMultiGroupInputThread()
                                                                 throws java.io.IOException
Returns a MultiGroupInputThread designed to handle multiple virtual socket groups.

Parameters:
configuration -
Returns:
a MultiGroupInputThread designed to handle multiple virtual socket groups
Throws:
java.io.IOException

getaSingleGroupInputThread

public org.jboss.remoting.transport.multiplex.InputMultiplexor.SingleGroupInputThread getaSingleGroupInputThread(MultiplexingManager manager,
                                                                                                                 java.net.Socket socket,
                                                                                                                 java.io.OutputStream os)
                                                                                                          throws java.io.IOException
Returns a SingleGroupInputThread designed to handle a single virtual socket group.

Returns:
a SingleGroupInputThread designed to handle a single virtual socket group
Throws:
java.io.IOException


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