Framework Professional Edition Package


com.prosyst.util.net
Interface ServerSocketFactory

All Known Implementing Classes:
PlainSocketFactory

public interface ServerSocketFactory

This is a facade for a server socket factory service. The interface provides various methods for server socket creation. Under this interface can be hidden protocol-specific implementation, while users are isolated from the protocol logic.

An implementation is provided by the TLS Server Bundle.


Method Summary
 java.net.ServerSocket openServerSocket(int port)
          Returns a ServerSocket bound to the specified port.
 java.net.ServerSocket openServerSocket(int port, java.util.Dictionary props)
          Returns a ServerSocket bound to the specified port.
 java.net.ServerSocket openServerSocket(int port, int backlog)
          Returns a ServerSocket bound to the specified port with maximum number of waiting connections backlog.
 java.net.ServerSocket openServerSocket(int port, int backlog, java.util.Dictionary props)
          Returns a ServerSocket binded to the specified port with maximum number of waiting to be accepted connections backlog.
 java.net.ServerSocket openServerSocket(int port, int backlog, java.net.InetAddress bindAddress)
          Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines )with maximum number of connections backlog
 java.net.ServerSocket openServerSocket(int port, int backlog, java.net.InetAddress bindAddress, java.util.Dictionary props)
          Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines ) with maximum number of connections backlog.
 

Method Detail

openServerSocket

java.net.ServerSocket openServerSocket(int port)
                                       throws java.io.IOException
Returns a ServerSocket bound to the specified port.

Parameters:
port - port to bind the ServerSocket to.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if ServerSocket can not be opened. A reason may be that port is busy.

openServerSocket

java.net.ServerSocket openServerSocket(int port,
                                       java.util.Dictionary props)
                                       throws java.io.IOException
Returns a ServerSocket bound to the specified port.

Parameters:
port - port to bind the ServerSocket to.
props - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

java.net.ServerSocket openServerSocket(int port,
                                       int backlog)
                                       throws java.io.IOException
Returns a ServerSocket bound to the specified port with maximum number of waiting connections backlog.

Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

java.net.ServerSocket openServerSocket(int port,
                                       int backlog,
                                       java.util.Dictionary props)
                                       throws java.io.IOException
Returns a ServerSocket binded to the specified port with maximum number of waiting to be accepted connections backlog.

Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
props - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

java.net.ServerSocket openServerSocket(int port,
                                       int backlog,
                                       java.net.InetAddress bindAddress)
                                       throws java.io.IOException
Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines )with maximum number of connections backlog

Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
bindAddress -
Returns:
a ServerSocket bound to the port and address
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

openServerSocket

java.net.ServerSocket openServerSocket(int port,
                                       int backlog,
                                       java.net.InetAddress bindAddress,
                                       java.util.Dictionary props)
                                       throws java.io.IOException
Returns a ServerSocket bound to the specified port and bindAddress ( for multi IP machines ) with maximum number of connections backlog.

Parameters:
port - port to bind the ServerSocket to.
backlog - the maximum length of the queue.
bindAddress -
props - socket properties. ServerSockets can be customized via these properties. See ServerSocketFactory implementation documentation for details on how to use these properties.
Returns:
a ServerSocket bound to the port and bind address.
Throws:
java.io.IOException - if an I/O error occurs when opening the socket.

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved