FileDocCategorySizeDatePackage
DefaultCommonsHTTPClientProperties.javaAPI DocApache Axis 1.45065Sat Apr 22 18:57:28 BST 2006org.apache.axis.components.net

DefaultCommonsHTTPClientProperties

public class DefaultCommonsHTTPClientProperties extends Object implements CommonsHTTPClientProperties
Default property set for the of the multi threaded connection pool used in the CommonsHTTPSender transport implementation. Values returned by this implementation are identical to the defaults for the Commons HTTPClient library itself, unless overridden with Axis properties.
author
Eric Friedman

Fields Summary
public static final String
MAXIMUM_TOTAL_CONNECTIONS_PROPERTY_KEY
the key for the Axis Property that controls the maximum total connections allowed in the httpclient pool
public static final String
MAXIMUM_CONNECTIONS_PER_HOST_PROPERTY_KEY
the key for the Axis Property that controls the maximum connections per host allowed by the httpclient pool
public static final String
CONNECTION_POOL_TIMEOUT_KEY
the key for the Axis Property that sets the connection pool timeout for the httpclient pool
public static final String
CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY
the key for the Axis Property that sets the default connection timeout for the httpclient, can be overriden by the MessageContext
public static final String
CONNECTION_DEFAULT_SO_TIMEOUT_KEY
the key for the Axis Property that sets the read timeout for the httpclient
Constructors Summary
Methods Summary
public intgetConnectionPoolTimeout()
Return the integer value associated with the property axis.http.client.connection.pool.timeout or a default of 0.

return
an integer >= 0

        int i = getIntegerProperty(CONNECTION_POOL_TIMEOUT_KEY, "0");
        if (i < 0) {
            throw new IllegalStateException(CONNECTION_POOL_TIMEOUT_KEY + " must be >= 0");
        }
        return i;
    
public intgetDefaultConnectionTimeout()
Return the integer value associated with the property axis.http.client.connection.default.connection.timeout or a default of 0.

return
an integer >= 0

        int i = getIntegerProperty(CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "0");
        if (i < 0) {
            throw new IllegalStateException(CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY + " must be >= 0");
        }
        return i;
    
public intgetDefaultSoTimeout()
Return the integer value associated with the property axis.http.client.connection.default.so.timeout or a default of 0.

return
an integer >= 0

        int i = getIntegerProperty(CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "0");
        if (i < 0) {
            throw new IllegalStateException(CONNECTION_DEFAULT_SO_TIMEOUT_KEY + " must be >= 0");
        }
        return i;
    
protected final intgetIntegerProperty(java.lang.String property, java.lang.String dephault)
Convert the value for property into an int or, if none is found, use the dephault value instead.

return
an integer value


                               
           
        return Integer.parseInt(AxisProperties.getProperty(property, dephault));
    
public intgetMaximumConnectionsPerHost()
Return the integer value associated with the property axis.http.client.maximum.connections.per.host or a default of 2.

return
a whole integer

        int i = getIntegerProperty(MAXIMUM_CONNECTIONS_PER_HOST_PROPERTY_KEY, "2");
        if (i < 1) {
            throw new IllegalStateException(MAXIMUM_CONNECTIONS_PER_HOST_PROPERTY_KEY + " must be > 1");
        }
        return i;
    
public intgetMaximumTotalConnections()
Return the integer value associated with the property axis.http.client.maximum.total.connections or a default of 20.

return
a whole integer

        int i = getIntegerProperty(MAXIMUM_TOTAL_CONNECTIONS_PROPERTY_KEY, "20");
        if (i < 1) {
            throw new IllegalStateException(MAXIMUM_TOTAL_CONNECTIONS_PROPERTY_KEY + " must be > 1");
        }
        return i;