org.opensaml.ws.soap.client.http
Class TLSProtocolSocketFactory

java.lang.Object
  extended by org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory
All Implemented Interfaces:
org.apache.commons.httpclient.protocol.ProtocolSocketFactory, org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

@ThreadSafe
public class TLSProtocolSocketFactory
extends Object
implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

An SSL/TLS socket factory that uses KeyStoreFactory's to get its key and trust material.


Constructor Summary
TLSProtocolSocketFactory(X509KeyManager keyMgr, X509TrustManager trustMgr)
          Constructor.
 
Method Summary
 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()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLSProtocolSocketFactory

public TLSProtocolSocketFactory(X509KeyManager keyMgr,
                                X509TrustManager trustMgr)
                         throws IllegalArgumentException
Constructor.

Parameters:
keyMgr - manager used to retrieve client-cert authentication keys for a given host
trustMgr - manager used to validate the X.509 credentials of a given host
Throws:
IllegalArgumentException - thrown if the given key or trust manager can not be used to create the SSLContext used to create new sockets
Method Detail

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException

Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress localHost,
                           int clientPort)
                    throws IOException

Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
IOException

createSocket

public Socket createSocket(Socket socket,
                           String host,
                           int port,
                           boolean autoClose)
                    throws IOException

Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress localHost,
                           int localPort,
                           org.apache.commons.httpclient.params.HttpConnectionParams connParams)
                    throws IOException

Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
IOException

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2006-2013 Internet2. All Rights Reserved.