org.ssonet.net.impl
Class SSONETServerSocketFactory

java.lang.Object
  |
  +--org.ssonet.net.impl.SSONETServerSocketFactory
All Implemented Interfaces:
java.rmi.server.RMIServerSocketFactory, java.io.Serializable

public class SSONETServerSocketFactory
extends java.lang.Object
implements java.rmi.server.RMIServerSocketFactory, java.io.Serializable

This class creates SSONETServerSockets. When Java-RMI is done over SSONET, this factory is needed.

See Also:
Serialized Form

Field Summary
protected  org.ssonet.net.SSONETContextFactory contextFactory
          the SSONETContextFactory used
 
Constructor Summary
SSONETServerSocketFactory(org.ssonet.net.SSONETContextFactory c)
          Creates a SSONETServerSocketFactory and sets a SSONETContextFactory.
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Returns a ServerSocket, which listens at the specified port.
 java.net.ServerSocket createServerSocket(int port, int clients)
          Returns a ServerSocket, which listens at the specified port, and has a wait queue of clients length.
 java.net.ServerSocket createServerSocket(int port, int clients, java.net.InetAddress bindAddr)
          Returns a ServerSocket, which listens at the specified port, and has a wait queue of clients length, and which is bound to the specified InetAddress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextFactory

protected transient org.ssonet.net.SSONETContextFactory contextFactory
the SSONETContextFactory used

Constructor Detail

SSONETServerSocketFactory

public SSONETServerSocketFactory(org.ssonet.net.SSONETContextFactory c)
Creates a SSONETServerSocketFactory and sets a SSONETContextFactory.

Parameters:
c - the SSONETContextFactory which sahll be bound to SSONETServerSockets created by this object.
Method Detail

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Returns a ServerSocket, which listens at the specified port.

Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Parameters:
port - the port the ServerSocket shall listen on
Returns:
a newly created ServerSocket
Throws:
java.io.IOException - if something goes wrong during creation of the ServerSocket

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int clients)
                                         throws java.io.IOException
Returns a ServerSocket, which listens at the specified port, and has a wait queue of clients length.

Parameters:
port - the port the ServerSocket shall listen on
clients - the length of the wait queue
Returns:
a newly created server socket
Throws:
java.io.IOException - if something goes wrong during creation of the ServerSocket

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int clients,
                                                java.net.InetAddress bindAddr)
                                         throws java.io.IOException
Returns a ServerSocket, which listens at the specified port, and has a wait queue of clients length, and which is bound to the specified InetAddress.

Parameters:
port - the port the ServerSocket shall listen on
clients - the length of the wait queue
bindAddr - the internet address the server socket is bound to
Returns:
a newly created server socket
Throws:
java.io.IOException - if something goes wrong during creation of the ServerSocket


Copyright © 2003 DRIM Team. All Rights Reserved.