org.jcoderz.commons.connector.http.transport
Class SslSocketFactory

java.lang.Object
  extended by org.jcoderz.commons.connector.http.transport.SslSocketFactory
All Implemented Interfaces:
org.apache.commons.httpclient.protocol.ProtocolSocketFactory, org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

public final class SslSocketFactory
extends Object
implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

Factory used to create SSLSocket.


Constructor Summary
SslSocketFactory(KeyStore keyStore, KeyStore trustStore, String keyAlias, String keyPassword)
          Constructor.
SslSocketFactory(String keyStoreLocation, String keyStorePassword, String trustStoreLocation, String trustStorePassword, String keyAlias, String keyPassword)
          Constructor.
 
Method Summary
 Socket createSocket(Socket socket, String host, int port, boolean autoClose)
          
 Socket createSocket(String host, int port)
          
 Socket createSocket(String arg0, int arg1, InetAddress arg2, int arg3)
          
 Socket createSocket(String host, int port, InetAddress localAddress, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams params)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SslSocketFactory

public SslSocketFactory(String keyStoreLocation,
                        String keyStorePassword,
                        String trustStoreLocation,
                        String trustStorePassword,
                        String keyAlias,
                        String keyPassword)
Constructor.

Parameters:
keyStoreLocation - the location of the key store in use
keyStorePassword - the password of the key store in use
trustStoreLocation - the location of the trust store in use
trustStorePassword - the password of the trust store in use
keyAlias - the alias of the key in use
keyPassword - the password of the key in use

SslSocketFactory

public SslSocketFactory(KeyStore keyStore,
                        KeyStore trustStore,
                        String keyAlias,
                        String keyPassword)
Constructor.

Parameters:
keyStore - the keystore to use
trustStore - the truststore in use
keyAlias - the alias of the key in use
keyPassword - the password of the key in use
Method Detail

createSocket

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

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

createSocket

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

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

createSocket

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

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

createSocket

public Socket createSocket(String arg0,
                           int arg1,
                           InetAddress arg2,
                           int arg3)
                    throws IOException,
                           UnknownHostException

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


Copyright 2007 The jCoderZ Project.