org.glite.security.trustmanager.axis
Class AXISSocketFactory

java.lang.Object
  extended by org.glite.security.trustmanager.axis.AXISSocketFactory
All Implemented Interfaces:
org.apache.axis.components.net.SecureSocketFactory, org.apache.axis.components.net.SocketFactory

public class AXISSocketFactory
extends java.lang.Object
implements org.apache.axis.components.net.SecureSocketFactory

The Axis socketfactory used for interfacing with axis 1.1 and 1.2.

Author:
Joni Hahkala Created on September 3, 2002, 9:04 PM

Constructor Summary
AXISSocketFactory(java.util.Hashtable attributes)
          Creates a new instance of AxisSocketFactory
 
Method Summary
static void clearCurrentProperties()
          Clears the thread specific properties.
 java.net.Socket create(java.lang.String host, int port, java.lang.StringBuffer otherHeaders, org.apache.axis.components.net.BooleanHolder useFullURL)
          Creates a socket and connects to the given host, verifying the certificate and possibly checking it against the hostname (depends on the hostname check variable in configuration).
 java.lang.Object createServerFactory()
          Creates a server factory.
static java.util.Properties getCurrentProperties()
          Returns the current configuration properties.
static void setCurrentProperties(java.util.Properties cp)
          Sets the current properties for the socket factory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AXISSocketFactory

public AXISSocketFactory(java.util.Hashtable attributes)
Creates a new instance of AxisSocketFactory

Parameters:
attributes -
Method Detail

getCurrentProperties

public static java.util.Properties getCurrentProperties()
Returns the current configuration properties.

Returns:
java.util.Properties with the settings of the current thread.

clearCurrentProperties

public static void clearCurrentProperties()
Clears the thread specific properties.


setCurrentProperties

public static void setCurrentProperties(java.util.Properties cp)
Sets the current properties for the socket factory.

Parameters:
cp - the Properties associated with the current thread

create

public java.net.Socket create(java.lang.String host,
                              int port,
                              java.lang.StringBuffer otherHeaders,
                              org.apache.axis.components.net.BooleanHolder useFullURL)
                       throws java.lang.Exception
Creates a socket and connects to the given host, verifying the certificate and possibly checking it against the hostname (depends on the hostname check variable in configuration).

Specified by:
create in interface org.apache.axis.components.net.SocketFactory
Parameters:
host - The host to connect to.
port - The port to connect to.
otherHeaders - ignored.
useFullURL - ignored.
Returns:
The open ssl socket.
Throws:
java.lang.Exception - in case connection open fails, ssl handshaking fails or hostname verification fails.

createServerFactory

public java.lang.Object createServerFactory()
                                     throws java.lang.Exception
Creates a server factory.

Returns:
the created server socketfactory.
Throws:
java.lang.Exception - in case the socket creation failed.