jist.swans.app.net
Class ServerSocket

java.lang.Object
  extended by jist.swans.app.net.ServerSocket

public class ServerSocket
extends java.lang.Object

The SWANS target of all java.net.ServerSocket calls.

Since:
SWANS1.0
Version:
$Id: ServerSocket.java,v 1.8 2004/04/06 16:07:47 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu&rt;

Field Summary
private  SocketInterface.TcpServerSocketInterface serverSocketEntity
          supporting serversocket entity.
 
Constructor Summary
ServerSocket()
           
ServerSocket(int port)
           
ServerSocket(int port, int backlog)
           
ServerSocket(int port, int backlog, java.net.InetAddress bindAddr)
           
 
Method Summary
 void _jistPostInit()
          Method call after socket initialization.
 Socket accept()
           
 void bind(java.net.SocketAddress endpoint)
           
 void bind(java.net.SocketAddress endpoint, int backlog)
           
 void close()
           
 java.nio.channels.ServerSocketChannel getChannel()
           
 java.net.InetAddress getInetAddress()
           
 int getLocalPort()
           
 java.net.SocketAddress getLocalSocketAddress()
           
 int getReceiveBufferSize()
           
 boolean getReuseAddress()
           
 int getSoTimeout()
           
protected  void implAccept(Socket s)
           
 boolean isBound()
           
 boolean isClosed()
           
 void setReceiveBufferSize(int size)
           
 void setReuseAddress(boolean on)
           
static void setSocketFactory(java.net.SocketImplFactory fac)
           
 void setSoTimeout(int timeout)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serverSocketEntity

private SocketInterface.TcpServerSocketInterface serverSocketEntity
supporting serversocket entity.

Constructor Detail

ServerSocket

public ServerSocket()
See Also:
ServerSocket

ServerSocket

public ServerSocket(int port)
See Also:
ServerSocket

ServerSocket

public ServerSocket(int port,
                    int backlog)
See Also:
ServerSocket

ServerSocket

public ServerSocket(int port,
                    int backlog,
                    java.net.InetAddress bindAddr)
See Also:
ServerSocket
Method Detail

_jistPostInit

public void _jistPostInit()
Method call after socket initialization. Since constructors can not be blocking, we performing blocking events in this method, which is called immediately after the constructor.


accept

public Socket accept()
See Also:
ServerSocket

bind

public void bind(java.net.SocketAddress endpoint)
See Also:
ServerSocket

bind

public void bind(java.net.SocketAddress endpoint,
                 int backlog)
See Also:
ServerSocket

close

public void close()
See Also:
ServerSocket

getChannel

public java.nio.channels.ServerSocketChannel getChannel()
See Also:
ServerSocket

getInetAddress

public java.net.InetAddress getInetAddress()
See Also:
ServerSocket

getLocalPort

public int getLocalPort()
See Also:
ServerSocket

getLocalSocketAddress

public java.net.SocketAddress getLocalSocketAddress()
See Also:
ServerSocket

getReceiveBufferSize

public int getReceiveBufferSize()
See Also:
ServerSocket

getReuseAddress

public boolean getReuseAddress()
See Also:
ServerSocket

getSoTimeout

public int getSoTimeout()
See Also:
ServerSocket

implAccept

protected void implAccept(Socket s)
See Also:
ServerSocket

isBound

public boolean isBound()
See Also:
ServerSocket

isClosed

public boolean isClosed()
See Also:
ServerSocket

setReceiveBufferSize

public void setReceiveBufferSize(int size)
See Also:
ServerSocket

setReuseAddress

public void setReuseAddress(boolean on)
See Also:
ServerSocket

setSocketFactory

public static void setSocketFactory(java.net.SocketImplFactory fac)
See Also:
ServerSocket

setSoTimeout

public void setSoTimeout(int timeout)
See Also:
ServerSocket

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
ServerSocket