org.jboss.remoting.transport.multiplex
Class VirtualServerSocket

java.lang.Object
  extended by java.net.ServerSocket
      extended by org.jboss.remoting.transport.multiplex.VirtualServerSocket
All Implemented Interfaces:
java.io.Serializable

public class VirtualServerSocket
extends java.net.ServerSocket
implements java.io.Serializable

VirtualServerSocket is one of the two implementations of a server socket in the Multiplex project. Each VirtualServerSocket belongs to an existing virtual socket group, and each VirtualScoket it creates is added to that virtual socket group. For more details, see the Multiplex documentation on the labs.jboss.org web site.

Most of the methods in VirtualServerSocket override those in its parent class, java.net.ServerSocket. For method descriptions, see the ServerSocket javadoc.

Copyright (c) 2005

Author:
Ron Sigal
See Also:
Serialized Form

Nested Class Summary
protected  class VirtualServerSocket.PendingClose
           
 
Constructor Summary
VirtualServerSocket()
           
VirtualServerSocket(java.net.InetSocketAddress remoteAddress, java.net.InetSocketAddress localAddress, int timeout, java.util.Map configuration)
          See superclass javadoc.
VirtualServerSocket(int port)
          See superclass javadoc.
VirtualServerSocket(int port, int backlog)
          See superclass javadoc.
VirtualServerSocket(int port, int backlog, java.net.InetAddress bindAddr)
          See superclass javadoc.
VirtualServerSocket(VirtualSocket socket, java.util.Map configuration)
          See superclass javadoc.
 
Method Summary
 java.net.Socket accept()
          See superclass javadoc.
 void bind(java.net.SocketAddress socketAddress)
          See superclass javadoc.
 void bind(java.net.SocketAddress socketAddress, int backlog)
          See superclass javadoc.
 void close()
          See superclass javadoc.
 void connect(java.net.SocketAddress remoteAddress)
          See superclass javadoc.
 void connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
          Connects this socket to the server.
 void connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, int timeout)
          See superclass javadoc.
protected  void doClose()
           
 java.nio.channels.ServerSocketChannel getChannel()
          See superclass javadoc.
 java.net.InetAddress getInetAddress()
          See superclass javadoc.
 int getLocalPort()
          See superclass javadoc.
 java.net.SocketAddress getLocalSocketAddress()
          See superclass javadoc.
 MultiplexingManager getMultiplexingManager()
           
 int getReceiveBufferSize()
          See superclass javadoc.
 java.net.InetAddress getRemoteAddress()
          See superclass javadoc.
 int getRemotePort()
          See superclass javadoc.
 boolean getReuseAddress()
          See superclass javadoc.
 int getSoTimeout()
          See superclass javadoc.
 boolean isBound()
          See superclass javadoc.
 boolean isClosed()
          See superclass javadoc.
 boolean isConnected()
          See superclass javadoc.
 void setConfiguration(java.util.Map configuration)
          See superclass javadoc.
 void setReceiveBufferSize(int size)
          See superclass javadoc.
 void setReuseAddress(boolean on)
          See superclass javadoc.
 void setSoTimeout(int timeout)
          See superclass javadoc.
 java.lang.String toString()
          See superclass javadoc.
 
Methods inherited from class java.net.ServerSocket
implAccept, setPerformancePreferences, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualServerSocket

public VirtualServerSocket()
                    throws java.io.IOException
Throws:
java.io.IOException

VirtualServerSocket

public VirtualServerSocket(int port)
                    throws java.io.IOException
See superclass javadoc.

Parameters:
port -
Throws:
java.io.IOException

VirtualServerSocket

public VirtualServerSocket(int port,
                           int backlog)
                    throws java.io.IOException
See superclass javadoc.

Parameters:
port -
backlog -
Throws:
java.io.IOException

VirtualServerSocket

public VirtualServerSocket(int port,
                           int backlog,
                           java.net.InetAddress bindAddr)
                    throws java.io.IOException
See superclass javadoc.

Parameters:
port -
backlog -
bindAddr -
Throws:
java.io.IOException

VirtualServerSocket

public VirtualServerSocket(VirtualSocket socket,
                           java.util.Map configuration)
                    throws java.io.IOException
See superclass javadoc.

Parameters:
configuration -
Throws:
java.io.IOException

VirtualServerSocket

public VirtualServerSocket(java.net.InetSocketAddress remoteAddress,
                           java.net.InetSocketAddress localAddress,
                           int timeout,
                           java.util.Map configuration)
                    throws java.io.IOException
See superclass javadoc.

Parameters:
timeout -
configuration -
port -
Throws:
java.io.IOException
Method Detail

accept

public java.net.Socket accept()
                       throws java.io.IOException
See superclass javadoc.

Overrides:
accept in class java.net.ServerSocket
Throws:
java.io.IOException

bind

public void bind(java.net.SocketAddress socketAddress)
          throws java.io.IOException
See superclass javadoc.

Overrides:
bind in class java.net.ServerSocket
Throws:
java.io.IOException

bind

public void bind(java.net.SocketAddress socketAddress,
                 int backlog)
          throws java.io.IOException
See superclass javadoc.

Overrides:
bind in class java.net.ServerSocket
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
See superclass javadoc.

Overrides:
close in class java.net.ServerSocket
Throws:
java.io.IOException

getInetAddress

public java.net.InetAddress getInetAddress()
See superclass javadoc.

Overrides:
getInetAddress in class java.net.ServerSocket

getLocalPort

public int getLocalPort()
See superclass javadoc.

Overrides:
getLocalPort in class java.net.ServerSocket

getChannel

public java.nio.channels.ServerSocketChannel getChannel()
See superclass javadoc.

Overrides:
getChannel in class java.net.ServerSocket

getLocalSocketAddress

public java.net.SocketAddress getLocalSocketAddress()
See superclass javadoc.

Overrides:
getLocalSocketAddress in class java.net.ServerSocket

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws java.net.SocketException
See superclass javadoc.

Overrides:
getReceiveBufferSize in class java.net.ServerSocket
Throws:
java.net.SocketException

getReuseAddress

public boolean getReuseAddress()
                        throws java.net.SocketException
See superclass javadoc.

Overrides:
getReuseAddress in class java.net.ServerSocket
Throws:
java.net.SocketException

getSoTimeout

public int getSoTimeout()
                 throws java.net.SocketException
See superclass javadoc.

Overrides:
getSoTimeout in class java.net.ServerSocket
Throws:
java.net.SocketException

isBound

public boolean isBound()
See superclass javadoc.

Overrides:
isBound in class java.net.ServerSocket

isClosed

public boolean isClosed()
See superclass javadoc.

Overrides:
isClosed in class java.net.ServerSocket

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws java.net.SocketException
See superclass javadoc.

Overrides:
setReceiveBufferSize in class java.net.ServerSocket
Throws:
java.net.SocketException

setReuseAddress

public void setReuseAddress(boolean on)
                     throws java.net.SocketException
See superclass javadoc.

Overrides:
setReuseAddress in class java.net.ServerSocket
Throws:
java.net.SocketException

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.net.SocketException
See superclass javadoc.

Overrides:
setSoTimeout in class java.net.ServerSocket
Throws:
java.net.SocketException

toString

public java.lang.String toString()
See superclass javadoc.

Overrides:
toString in class java.net.ServerSocket

connect

public void connect(java.net.SocketAddress remoteAddress)
             throws java.io.IOException
See superclass javadoc.

Throws:
java.io.IOException

connect

public void connect(java.net.SocketAddress remoteAddress,
                    java.net.SocketAddress localAddress)
             throws java.io.IOException
Connects this socket to the server. See superclass javadoc.

Throws:
java.io.IOException

connect

public void connect(java.net.SocketAddress remoteAddress,
                    java.net.SocketAddress localAddress,
                    int timeout)
             throws java.io.IOException
See superclass javadoc.

Throws:
java.io.IOException

getMultiplexingManager

public MultiplexingManager getMultiplexingManager()
Returns:

isConnected

public boolean isConnected()
See superclass javadoc.


getRemoteAddress

public java.net.InetAddress getRemoteAddress()
See superclass javadoc.


getRemotePort

public int getRemotePort()
See superclass javadoc.


setConfiguration

public void setConfiguration(java.util.Map configuration)
See superclass javadoc.


doClose

protected void doClose()


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