uk.ac.soton.itinnovation.grid.comms.client
Class ITInnovSocketFactory
java.lang.Object
org.apache.axis.components.net.DefaultSocketFactory
org.apache.axis.components.net.JSSESocketFactory
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ITInnovSocketFactory
public ITInnovSocketFactory()
ITInnovSocketFactory
public ITInnovSocketFactory(Hashtable attributes)
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 defaultvalidator - 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.