public class TcpChannelFactory extends java.lang.Object implements ChannelFactory
ChannelFactory
interface for
SSL/TLS secured TCP connectionsModifier and Type | Field and Description |
---|---|
private TcpParams |
params
the parameters
|
private javax.net.ssl.SSLSocketFactory |
socketFactory
the socket factory
|
Constructor and Description |
---|
TcpChannelFactory(TcpParams theParams)
constructor
|
Modifier and Type | Method and Description |
---|---|
RegistryChannel |
createChannel()
create a new channel.
|
private void |
verifyServerName(javax.net.ssl.SSLSocket socket)
verify that the common name of the server certificate's subject
is identical with the reverse mapping of the servers address
|
private TcpParams params
private javax.net.ssl.SSLSocketFactory socketFactory
public TcpChannelFactory(TcpParams theParams)
theParams
- the parameterspublic RegistryChannel createChannel() throws java.io.IOException
null
is returned. If a channel could not be created for
a different reason, an IOException
is thrown. Channels that
are no longer used by the caller should be closedcreateChannel
in interface ChannelFactory
null
if no more
channels are availablejava.io.IOException
- if the channel could not be createdprivate void verifyServerName(javax.net.ssl.SSLSocket socket) throws java.io.IOException, java.security.GeneralSecurityException
socket
- the socketjava.io.IOException
- on SSL related I/O exceptionsjava.security.GeneralSecurityException
- if the addresses do not matchCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH