com.cafesoft.core.message
Interface SocketFactory
- All Known Implementing Classes:
- DefaultSocketFactory, SslSocketFactory
- public interface SocketFactory
Creates Socket instances.
Note: The SocketFactory interface is already designed to handle
SSL socket exceptions.
- Since:
- 1/31/02
|
Method Summary |
Socket |
createSocket(InetAddress address,
int port)
Returns a socket which uses the specified network interface to the remote
host, and is bound to a the specified port. |
void |
initialize(Properties prop)
Initialize the SocketFactory. |
initialize
public void initialize(Properties prop)
throws SocketFactoryException
- Initialize the SocketFactory.
- Parameters:
prop - properties used to initialize the SocketFactory.
- Throws:
SocketFactoryException - if required configuration properties
are missing or invalid.
createSocket
public Socket createSocket(InetAddress address,
int port)
throws IOException,
KeyStoreException,
NoSuchAlgorithmException,
CertificateException,
UnrecoverableKeyException,
KeyManagementException
- Returns a socket which uses the specified network interface to the remote
host, and is bound to a the specified port. The socket is configured with
the socket options given to this factory.
- Parameters:
address - the network interface address to useport - the port to listen to
- 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.