org.jboss.remoting.transport.multiplex
Class MultiplexingManager

java.lang.Object
  extended byorg.jboss.remoting.transport.multiplex.MultiplexingManager

public class MultiplexingManager
extends java.lang.Object

Copyright (c) 2005

Author:
Ron Sigal

Nested Class Summary
protected  class MultiplexingManager.ShutdownThread
           
static class MultiplexingManager.StreamPair
           
 
Field Summary
static boolean ON_CLIENT
           
static boolean ON_SERVER
           
 
Constructor Summary
protected MultiplexingManager()
           
protected MultiplexingManager(java.net.InetSocketAddress address)
           
protected MultiplexingManager(java.net.Socket socket)
           
protected MultiplexingManager(java.lang.String host, int port)
           
 
Method Summary
 void bind(java.net.InetSocketAddress address)
           
 void connect(java.net.InetSocketAddress address)
           
 java.util.Collection getAllOutputStreams()
           
static MultiplexingManager getaManager(int port)
           
static MultiplexingManager getaManager(java.net.Socket socket)
           
static MultiplexingManager getaManagerByLocalAddress(java.net.InetSocketAddress address)
           
static MultiplexingManager getaManagerByRemoteAddress(java.net.InetSocketAddress address)
           
 MultiplexingInputStream getAnInputStream(SocketId socketId, VirtualSocket socket)
           
 OutputMultiplexor getOutputMultiplexor()
           
 java.io.OutputStream getOutputStreamByLocalSocket(SocketId socketId)
           
 Protocol getProtocol()
           
 int getReferenceCount()
           
 java.net.ServerSocket getServerSocket()
          FIXME Comment this
 java.net.Socket getSocket()
           
 VirtualSocket getSocketByLocalPort(SocketId socketId)
           
 void incrementReferences()
           
 boolean isBound()
          FIXME Comment this
 boolean isConnected()
          FIXME Comment this
 boolean isConnectedRemoteSocket(SocketId socketId)
           
static boolean isOnClient()
           
 boolean isServerSocketRegistered()
          FIXME Comment this
protected  void registerByLocalAddress(java.net.InetSocketAddress address)
           
protected  void registerByRemoteAddress(java.net.InetSocketAddress address)
           
 void registerRemoteServerSocket()
          FIXME Comment this
 void registerServerSocket(java.net.ServerSocket serverSocket)
           
 MultiplexingManager.StreamPair registerSocket(VirtualSocket socket)
           
 void releaseReference()
          FIXME Comment this
static void setOnClient(boolean isOnClient)
           
protected  void setup()
           
 void shutdown()
           
 void unRegisterRemoteServerSocket()
          FIXME Comment this
 void unRegisterServerSocket(java.net.ServerSocket serverSocket)
           
 void unRegisterSocket(VirtualSocket socket)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ON_CLIENT

public static final boolean ON_CLIENT
See Also:
Constant Field Values

ON_SERVER

public static final boolean ON_SERVER
See Also:
Constant Field Values
Constructor Detail

MultiplexingManager

protected MultiplexingManager()

MultiplexingManager

protected MultiplexingManager(java.net.Socket socket)
                       throws java.io.IOException
Parameters:
socket -
Throws:
java.io.IOException

MultiplexingManager

protected MultiplexingManager(java.lang.String host,
                              int port)
                       throws java.net.UnknownHostException,
                              java.io.IOException

MultiplexingManager

protected MultiplexingManager(java.net.InetSocketAddress address)
                       throws java.io.IOException
Parameters:
address -
Throws:
java.io.IOException
Method Detail

setup

protected void setup()
              throws java.io.IOException
Throws:
java.io.IOException

getaManager

public static MultiplexingManager getaManager(int port)
                                       throws java.io.IOException
Parameters:
port -
Returns:
Throws:
java.io.IOException

getaManager

public static MultiplexingManager getaManager(java.net.Socket socket)
                                       throws java.io.IOException
Parameters:
socket -
Returns:
Throws:
java.io.IOException - TODO: what if multiplexor already exists?

getaManagerByLocalAddress

public static MultiplexingManager getaManagerByLocalAddress(java.net.InetSocketAddress address)
                                                     throws java.io.IOException
Parameters:
address -
Returns:
Throws:
java.io.IOException

getaManagerByRemoteAddress

public static MultiplexingManager getaManagerByRemoteAddress(java.net.InetSocketAddress address)
                                                      throws java.io.IOException
Parameters:
address -
Returns:
Throws:
java.io.IOException

isOnClient

public static boolean isOnClient()
Returns:

setOnClient

public static void setOnClient(boolean isOnClient)

incrementReferences

public void incrementReferences()

releaseReference

public void releaseReference()
FIXME Comment this


getReferenceCount

public int getReferenceCount()

bind

public void bind(java.net.InetSocketAddress address)
          throws java.io.IOException
Parameters:
address -
Throws:
java.io.IOException

registerByLocalAddress

protected void registerByLocalAddress(java.net.InetSocketAddress address)

registerByRemoteAddress

protected void registerByRemoteAddress(java.net.InetSocketAddress address)
Parameters:
address -

connect

public void connect(java.net.InetSocketAddress address)
             throws java.io.IOException
Parameters:
address -
Throws:
java.io.IOException

registerServerSocket

public void registerServerSocket(java.net.ServerSocket serverSocket)
                          throws java.io.IOException
Returns:
Throws:
java.io.IOException

unRegisterServerSocket

public void unRegisterServerSocket(java.net.ServerSocket serverSocket)
                            throws java.io.IOException
Parameters:
serverSocket -
Throws:
java.io.IOException

registerSocket

public MultiplexingManager.StreamPair registerSocket(VirtualSocket socket)
                                              throws java.io.IOException
Parameters:
socket -
Returns:
Throws:
java.io.IOException

unRegisterSocket

public void unRegisterSocket(VirtualSocket socket)
                      throws java.io.IOException
Parameters:
socket -
Throws:
java.io.IOException

registerRemoteServerSocket

public void registerRemoteServerSocket()
FIXME Comment this


unRegisterRemoteServerSocket

public void unRegisterRemoteServerSocket()
FIXME Comment this


getAnInputStream

public MultiplexingInputStream getAnInputStream(SocketId socketId,
                                                VirtualSocket socket)
                                         throws java.io.IOException
Parameters:
socketId -
socket - TODO
Returns:
Throws:
java.io.IOException

isConnectedRemoteSocket

public boolean isConnectedRemoteSocket(SocketId socketId)
Parameters:
socketId -
Returns:
TODO: isn't used

isServerSocketRegistered

public boolean isServerSocketRegistered()
FIXME Comment this

Returns:

getServerSocket

public java.net.ServerSocket getServerSocket()
FIXME Comment this

Returns:

getOutputStreamByLocalSocket

public java.io.OutputStream getOutputStreamByLocalSocket(SocketId socketId)
Parameters:
socketId -
Returns:

getAllOutputStreams

public java.util.Collection getAllOutputStreams()
Returns:

getSocketByLocalPort

public VirtualSocket getSocketByLocalPort(SocketId socketId)
Parameters:
socketId -
Returns:

getOutputMultiplexor

public OutputMultiplexor getOutputMultiplexor()
Returns:

getProtocol

public Protocol getProtocol()
Returns:

getSocket

public java.net.Socket getSocket()
Returns:

isBound

public boolean isBound()
FIXME Comment this

Returns:

isConnected

public boolean isConnected()
FIXME Comment this

Returns:

shutdown

public void shutdown()


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