com.infoengine.au.ssl
Class SimpleSocketFactory
java.lang.Object
com.infoengine.au.ssl.SimpleSocketFactory
- All Implemented Interfaces:
- SocketFactory
- public class SimpleSocketFactory
- extends Object
- implements SocketFactory
This class implements a socket factory that produces simple SSL sockets
using the default socket factory provided by the SSL reference
implementation.
The behavior of the factory is controlled by the following properties.
In each case, host.port corresponds to the host name and port number
of the server socket to which the client socket will connect. Note also
that it is possible to specify only host instead of
host.port. In this case, the property applies to all ports on
the specified host. If a property is defined using host.port,
this overrides a property that specifies just host.
- com.infoengine.ssl.simpleSocket.host.port.protocol
The name of the secure socket protocol to be used, usually TLS or
SSL. If not defined, the behavior of the socket is determined
entirely through connection handshaking.
- com.infoengine.ssl.simpleSocket.host.port.keyFile
The pathname of a file containing the keys used by the TLS or SSL
protocols. This property is required if a protocol is specified.
- com.infoengine.ssl.simpleSocket.host.port.algorithm
Specifies the name of the security algorithm used by the key manager.
If this property is not defined, the default is SunX509.
- com.infoengine.ssl.simpleSocket.host.port.keyStoreType
Specifies the type of the keystore. If this property is not defined, the
default is JKS.
- com.infoengine.ssl.simpleSocket.host.port.password
Specifies the password used in verifying and loading the keystore. If
this property is not defined, the keystore is not verified by password.
Method Summary |
Socket |
createSocket(String service,
String host,
int port)
Creates a socket that establishes a secure network connection to a
named service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSocketFactory
public SimpleSocketFactory()
- Constructor
createSocket
public Socket createSocket(String service,
String host,
int port)
throws IOException,
UnknownHostException
- Creates a socket that establishes a secure network connection to a
named service.
- Specified by:
createSocket
in interface SocketFactory
- Parameters:
service
- The name of the remote Info*Engine service to which the
socket will be connected.host
- The name of the host on which the service instance resides.port
- The port number on which the service instance listens for
connection requests.
- Returns:
- The connected socket.
- Throws:
IOEException
- if the connection can not be established
UnknownHostException
- if the host is not known
IOException