uk.ac.soton.itinnovation.grid.comms.client
Class ITInnovSocketFactory

java.lang.Object
  extended by org.apache.axis.components.net.DefaultSocketFactory
      extended by org.apache.axis.components.net.JSSESocketFactory
          extended by uk.ac.soton.itinnovation.grid.comms.client.ITInnovSocketFactory
All Implemented Interfaces:
SecureSocketFactory, SocketFactory

public class ITInnovSocketFactory
extends JSSESocketFactory

Custom SSL socket handler. This sets the correct keystore without using system properties. When using tomcat, system properties affect other webapps in the JVM and are shown on the Axis Happiness page.


Field Summary
 
Fields inherited from class org.apache.axis.components.net.JSSESocketFactory
sslFactory
 
Fields inherited from class org.apache.axis.components.net.DefaultSocketFactory
attributes, CONNECT_TIMEOUT, log
 
Constructor Summary
ITInnovSocketFactory()
           
ITInnovSocketFactory(Hashtable attributes)
           
 
Method Summary
 Socket create(String host, int port, StringBuffer otherHeaders, BooleanHolder useFullURL)
           
static CertificateTrustValidator getCurrentCertificateTrustValidator()
          Get the current thread-local trust validator.
static IdentityProvider getCurrentIdentityProvider()
          Get the current thread-local identity provider.
static org.apache.commons.httpclient.protocol.Protocol getProtocol()
          Return an httpclient Protocol that uses https with the Transport's keystore.
static void setHandlers(IdentityProvider idp, CertificateTrustValidator validator)
          Set the IdentityProvider and CertificateTrustValidator to use for SSL connections.
 
Methods inherited from class org.apache.axis.components.net.JSSESocketFactory
initFactory
 
Methods inherited from class org.apache.axis.components.net.DefaultSocketFactory
isHostInNonProxyList, match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITInnovSocketFactory

public ITInnovSocketFactory()

ITInnovSocketFactory

public ITInnovSocketFactory(Hashtable attributes)
Method Detail

setHandlers

public static void setHandlers(IdentityProvider idp,
                               CertificateTrustValidator validator)
Set the IdentityProvider and CertificateTrustValidator to use for SSL connections.

Parameters:
idp - IdentityProvider, or null for Java default
validator - CertificateTrustValidator to check server credentials, or null for Java default

getCurrentIdentityProvider

public static IdentityProvider getCurrentIdentityProvider()
Get the current thread-local identity provider. This is useful if you want to restore it after using setHandlers.


getCurrentCertificateTrustValidator

public static CertificateTrustValidator getCurrentCertificateTrustValidator()
Get the current thread-local trust validator. This is useful if you want to restore it after using setHandlers.


create

public Socket create(String host,
                     int port,
                     StringBuffer otherHeaders,
                     BooleanHolder useFullURL)
              throws Exception
Specified by:
create in interface SocketFactory
Overrides:
create in class JSSESocketFactory
Throws:
Exception

getProtocol

public static org.apache.commons.httpclient.protocol.Protocol getProtocol()
Return an httpclient Protocol that uses https with the Transport's keystore.



Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.