org.ssonet.net.impl
Class SSONETServerSocket

java.lang.Object
  |
  +--java.net.ServerSocket
        |
        +--org.ssonet.net.impl.SSONETServerSocket

public class SSONETServerSocket
extends java.net.ServerSocket

The SSONETServerSocket listens at server side for connection requests by clients. When a connection request is received, a SSONETServerClientSocket is created and returned to the application.


Field Summary
protected  org.ssonet.net.SSONETContextFactory contextFactory
          The SSONETContextFactory which this SSONETServerSocket uses to create contexts for received connections.
(package private)  boolean debug
           
 
Constructor Summary
SSONETServerSocket(int port, int clients, java.net.InetAddress bindAddr, org.ssonet.net.SSONETContextFactory cf)
          Creates a SSONETServerSocket with a wait queue of clients length, which is bound to the specified internet address.
SSONETServerSocket(int port, int clients, org.ssonet.net.SSONETContextFactory cf)
          Creates a SSONETServerSocket with a wait queue of clients length.
SSONETServerSocket(int port, org.ssonet.net.SSONETContextFactory cf)
          Creates a SSONETServerSocket.
 
Method Summary
 java.net.Socket accept()
          Waits for a connection and returns a Socket for the connection to calling the application.
 
Methods inherited from class java.net.ServerSocket
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

boolean debug

contextFactory

protected org.ssonet.net.SSONETContextFactory contextFactory
The SSONETContextFactory which this SSONETServerSocket uses to create contexts for received connections.

Constructor Detail

SSONETServerSocket

public SSONETServerSocket(int port,
                          org.ssonet.net.SSONETContextFactory cf)
                   throws java.io.IOException
Creates a SSONETServerSocket.

Parameters:
port - the port the SSONETServerSocket listens on,
cf - the SSONETContextFactory, which creates SSONETContexts for received connections.

SSONETServerSocket

public SSONETServerSocket(int port,
                          int clients,
                          org.ssonet.net.SSONETContextFactory cf)
                   throws java.io.IOException
Creates a SSONETServerSocket with a wait queue of clients length.

Parameters:
port - the port the SSONETServerSocket listens on,
clients - the length of the wait queue
cf - the SSONETContextFactory, which creates SSONETContexts for received connections.

SSONETServerSocket

public SSONETServerSocket(int port,
                          int clients,
                          java.net.InetAddress bindAddr,
                          org.ssonet.net.SSONETContextFactory cf)
                   throws java.io.IOException
Creates a SSONETServerSocket with a wait queue of clients length, which is bound to the specified internet address.

Parameters:
port - the port the SSONETServerSocket listens on,
clients - the length of the wait queue
bindAddr - the internet address the ServerSocket will be bound to.
cf - the SSONETContextFactory, which creates SSONETContexts for received connections.
Method Detail

accept

public java.net.Socket accept()
                       throws java.io.IOException
Waits for a connection and returns a Socket for the connection to calling the application.

Overrides:
accept in class java.net.ServerSocket
Returns:
a Socket for the accepted connection
java.io.IOException


Copyright © 2003 DRIM Team. All Rights Reserved.