org.jboss.remoting.transport.multiplex
Class InputMultiplexor
java.lang.Object
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
Field Summary |
protected static org.jboss.logging.Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.jboss.logging.Logger log
InputMultiplexor
public InputMultiplexor(java.util.Map configuration)
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.