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 java.lang.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(javax.net.ssl.X509KeyManager keyMgr, javax.net.ssl.X509TrustManager trustMgr)
          Constructor.
 
Method Summary
 java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose)
          
 java.net.Socket createSocket(java.lang.String host, int port)
          
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int clientPort)
          
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams connParams)
          
 boolean equals(java.lang.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(javax.net.ssl.X509KeyManager keyMgr,
                                javax.net.ssl.X509TrustManager trustMgr)
                         throws java.lang.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:
java.lang.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 java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException

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

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localHost,
                                    int clientPort)
                             throws java.io.IOException

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

createSocket

public java.net.Socket createSocket(java.net.Socket socket,
                                    java.lang.String host,
                                    int port,
                                    boolean autoClose)
                             throws java.io.IOException

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

createSocket

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

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

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object


Copyright © 2006-2011 Internet2. All Rights Reserved.