@ThreadSafe public class TLSProtocolSocketFactory extends Object implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Constructor and Description |
---|
TLSProtocolSocketFactory(X509KeyManager keyMgr,
X509TrustManager trustMgr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int clientPort) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort,
org.apache.commons.httpclient.params.HttpConnectionParams connParams) |
boolean |
equals(Object obj) |
int |
hashCode() |
public TLSProtocolSocketFactory(X509KeyManager keyMgr, X509TrustManager trustMgr) throws IllegalArgumentException
keyMgr
- manager used to retrieve client-cert authentication keys for a given hosttrustMgr
- manager used to validate the X.509 credentials of a given hostIllegalArgumentException
- thrown if the given key or trust manager can not be used to create the
SSLContext
used to create new socketspublic Socket createSocket(String host, int port) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int clientPort) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams connParams) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
Copyright © 1999-2013. All Rights Reserved.