org.glite.security.trustmanager.axis2
Class AXIS2SocketFactory

java.lang.Object
  extended by org.glite.security.trustmanager.axis2.AXIS2SocketFactory
All Implemented Interfaces:
org.apache.commons.httpclient.protocol.ProtocolSocketFactory, org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

public class AXIS2SocketFactory
extends java.lang.Object
implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

AXIS2SocketFactory.java

Author:
Andrei Krueger, Joni Hahkala Created on November 15, 2007 - based on AXISSocketFactory.java

Constructor Summary
AXIS2SocketFactory()
          Creates a new instance of AXIS2SocketFactory
 
Method Summary
static void clearCurrentProperties()
          Clears the thread specific properties object.
 java.net.Socket createSocket(java.net.Socket s, 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 localPort)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams params)
           
static java.util.Properties getCurrentProperties()
          Gets the threadlocal properties object if it is set, otherwise returns System properties object.
static void setCurrentProperties(java.util.Properties cp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AXIS2SocketFactory

public AXIS2SocketFactory()
Creates a new instance of AXIS2SocketFactory

Method Detail

getCurrentProperties

public static java.util.Properties getCurrentProperties()
Gets the threadlocal properties object if it is set, otherwise returns System properties object.

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

clearCurrentProperties

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


setCurrentProperties

public static void setCurrentProperties(java.util.Properties cp)
Parameters:
cp - the Properties associated with the current thread

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localHost,
                                    int localPort,
                                    org.apache.commons.httpclient.params.HttpConnectionParams params)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localHost,
                                    int localPort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
ProtocolSocketFactory.createSocket(java.lang.String,int,java.net.InetAddress,int)

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
ProtocolSocketFactory.createSocket(java.lang.String,int)

createSocket

public java.net.Socket createSocket(java.net.Socket s,
                                    java.lang.String host,
                                    int port,
                                    boolean autoClose)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
SecureProtocolSocketFactory.createSocket(java.net.Socket,java.lang.String,int,boolean)