com.cafesoft.core.message
Class DefaultServerSocketFactory
java.lang.Object
|
+--com.cafesoft.core.message.DefaultServerSocketFactory
- All Implemented Interfaces:
- ServerSocketFactory
- public final class DefaultServerSocketFactory
- extends Object
- implements ServerSocketFactory
Implements a factory for creating ServerSocket instances.
Note: The ServerSocketFactory interface is
already designed to handle SSL socket exceptions.
- Since:
- 1/31/02
|
Method Summary |
ServerSocket |
createSocket(int port)
Returns a server socket which uses all network interfaces on the host,
and is bound to a the specified port. |
ServerSocket |
createSocket(int port,
int backlog)
Returns a server socket which uses all network interfaces on the host, is
bound to a the specified port, and uses the specified connection backlog.
|
ServerSocket |
createSocket(int port,
int backlog,
InetAddress bindAddr)
Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. |
void |
initialize(Properties prop)
Initialize the SocketFactory. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultServerSocketFactory
public DefaultServerSocketFactory()
- Create a new
DefaultServerSocketFactory.
initialize
public void initialize(Properties prop)
throws SocketFactoryException
- Initialize the SocketFactory.
- Specified by:
initialize in interface ServerSocketFactory
- Parameters:
prop - properties used to initialize the SocketFactory.
- Throws:
SocketFactoryException - if required configuration properties
are missing or invalid.
createSocket
public ServerSocket createSocket(int port)
throws IOException,
KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
UnrecoverableKeyException,
KeyManagementException
- Returns a server socket which uses all network interfaces on the host,
and is bound to a the specified port. The socket is configured with the
socket options (such as accept timeout) given to this factory.
- Specified by:
createSocket in interface ServerSocketFactory
- Parameters:
port - the port to listen to
- Returns:
- a server socket for the specified port
- Throws:
IOException - input/output or network error
KeyStoreException - error instantiating the KeyStore from file
(SSL only)
NoSuchAlgorithmException - KeyStore algorithm unsupported by
current provider (SSL only)
CertificateException - general certificate error (SSL only)
UnrecoverableKeyException - internal KeyStore problem with the
certificate (SSL only)
KeyManagementException - problem in the key management layer
(SSL only)
createSocket
public ServerSocket createSocket(int port,
int backlog)
throws IOException,
KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
UnrecoverableKeyException,
KeyManagementException
- Returns a server socket which uses all network interfaces on the host, is
bound to a the specified port, and uses the specified connection backlog.
The socket is configured with the socket options (such as accept timeout)
given to this factory.
- Specified by:
createSocket in interface ServerSocketFactory
- Parameters:
port - the port to listen tobacklog - how many connections are queued
- Throws:
IOException - input/output or network error
KeyStoreException - error instantiating the KeyStore from file
(SSL only)
NoSuchAlgorithmException - KeyStore algorithm unsupported by
current provider (SSL only)
CertificateException - general certificate error (SSL only)
UnrecoverableKeyException - internal KeyStore problem with the
certificate (SSL only)
KeyManagementException - problem in the key management layer
(SSL only)
createSocket
public ServerSocket createSocket(int port,
int backlog,
InetAddress bindAddr)
throws IOException,
KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
UnrecoverableKeyException,
KeyManagementException
- Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. The socket is configured
with the socket options (such as accept timeout) given to this factory.
- Specified by:
createSocket in interface ServerSocketFactory
- Parameters:
port - the port to listen tobacklog - how many connections are queuedbindAddr - the network interface address to use
- Returns:
- a server socket for the specified port, backlog, and address
- Throws:
IOException - input/output or network error
KeyStoreException - error instantiating the KeyStore from file
(SSL only)
NoSuchAlgorithmException - KeyStore algorithm unsupported by
current provider (SSL only)
CertificateException - general certificate error (SSL only)
UnrecoverableKeyException - internal KeyStore problem with the
certificate (SSL only)
KeyManagementException - problem in the key management layer
(SSL only)
Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.