org.glite.authz.common.config
Class AbstractIniConfigurationParser<ConfigurationType extends AbstractConfiguration>

java.lang.Object
  extended by org.glite.authz.common.config.AbstractIniConfigurationParser<ConfigurationType>
Type Parameters:
ConfigurationType - the type of configuration produced by this parser
All Implemented Interfaces:
ConfigurationParser<ConfigurationType>
Direct Known Subclasses:
AbstractIniServiceConfigurationParser

@ThreadSafe
public abstract class AbstractIniConfigurationParser<ConfigurationType extends AbstractConfiguration>
extends java.lang.Object
implements ConfigurationParser<ConfigurationType>

Base class for configuration parsers that employ an INI file.


Field Summary
static java.lang.String CONN_TIMEOUT_PROP
          The name of the "connectionTimeout" which gives the connection timeout, in seconds.
static int DEFAULT_CONN_TIMEOUT
          Default value of the "connectionTimeout" property, 30 seconds.
static int DEFAULT_MAX_REQS
          Default value of the "maximumRequests" property, 200 .
static int DEFAULT_REC_BUFF_SIZE
          Default value of the "receiveBufferSize" property, 16384 kilobytes.
static int DEFAULT_SEND_BUFF_SIZE
          Default value of the "sendBufferSize" property, 16384 kilobytes.
static int DEFAULT_TRUST_INFO_REFRESH
          Default value of the "trustInfoRefresh" property, 60 .
static java.lang.String MAX_REQUESTS_PROP
          The name of the "maximumRequests" which gives the maximum number of simultaneous requests.
static java.lang.String REC_BUFF_SIZE_PROP
          The name of the "receiveBufferSize" which gives the size of the receiving message buffer, in bytes.
static java.lang.String SECURITY_SECTION_HEADER
          The name of the "SECURITY" INI header which contains the property for configuring credential/trust information.
static java.lang.String SEND_BUFF_SIZE_PROP
          The name of the "sendBufferSize" which gives the sending message buffer, in bytes.
static java.lang.String SERVICE_CERT_PROP
          The name of the "serviceCertificate" which gives the path to the service's certificate.
static java.lang.String SERVICE_KEY_PROP
          The name of the "servicePrivateKey" which gives the path to the service's private key.
static java.lang.String TRUST_INFO_DIR_PROP
          The name of the "trustInfoDir" which gives the path to directory of PEM-encoded trusted X.509 certificates.
static java.lang.String TRUST_INFO_REFRSH_PROP
          The name of the "trustInfoRefresh" which gives the refresh period, in minutes, for the trust information.
 
Constructor Summary
AbstractIniConfigurationParser()
           
 
Method Summary
protected  int getConnectionTimeout(org.ini4j.Profile.Section configSection)
          Gets the value of the "connectionTimeout" property from the configuration section.
protected  int getMaximumRequests(org.ini4j.Profile.Section configSection)
          Gets the value of the "maximumRequests" property from the configuration section.
protected  int getReceiveBufferSize(org.ini4j.Profile.Section configSection)
          Gets the value of the "receiveBufferSize" property from the configuration section.
protected  int getSendBufferSize(org.ini4j.Profile.Section configSection)
          Gets the value of the "sendBufferSize" property from the configuration section.
protected  int getTrustMaterialRefreshInterval(org.ini4j.Profile.Section configSection)
          Gets the value of the "trustInfoRefresh" property from the configuration section.
protected  javax.net.ssl.X509KeyManager getX509KeyManager(org.ini4j.Profile.Section configSection)
          Creates a KeyManager from the "servicePrivateKey" and "serviceCertificate" properties, if they exist.
protected  org.glite.voms.PKIStore getX509TrustMaterialStore(org.ini4j.Profile.Section configSection)
          Creates a PKIStore from the "trustInfoDir" property, if they exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glite.authz.common.config.ConfigurationParser
parse, parse
 

Field Detail

SECURITY_SECTION_HEADER

public static final java.lang.String SECURITY_SECTION_HEADER
The name of the "SECURITY" INI header which contains the property for configuring credential/trust information.

See Also:
Constant Field Values

SERVICE_KEY_PROP

public static final java.lang.String SERVICE_KEY_PROP
The name of the "servicePrivateKey" which gives the path to the service's private key.

See Also:
Constant Field Values

SERVICE_CERT_PROP

public static final java.lang.String SERVICE_CERT_PROP
The name of the "serviceCertificate" which gives the path to the service's certificate.

See Also:
Constant Field Values

TRUST_INFO_DIR_PROP

public static final java.lang.String TRUST_INFO_DIR_PROP
The name of the "trustInfoDir" which gives the path to directory of PEM-encoded trusted X.509 certificates.

See Also:
Constant Field Values

TRUST_INFO_REFRSH_PROP

public static final java.lang.String TRUST_INFO_REFRSH_PROP
The name of the "trustInfoRefresh" which gives the refresh period, in minutes, for the trust information.

See Also:
Constant Field Values

MAX_REQUESTS_PROP

public static final java.lang.String MAX_REQUESTS_PROP
The name of the "maximumRequests" which gives the maximum number of simultaneous requests.

See Also:
Constant Field Values

CONN_TIMEOUT_PROP

public static final java.lang.String CONN_TIMEOUT_PROP
The name of the "connectionTimeout" which gives the connection timeout, in seconds.

See Also:
Constant Field Values

REC_BUFF_SIZE_PROP

public static final java.lang.String REC_BUFF_SIZE_PROP
The name of the "receiveBufferSize" which gives the size of the receiving message buffer, in bytes.

See Also:
Constant Field Values

SEND_BUFF_SIZE_PROP

public static final java.lang.String SEND_BUFF_SIZE_PROP
The name of the "sendBufferSize" which gives the sending message buffer, in bytes.

See Also:
Constant Field Values

DEFAULT_TRUST_INFO_REFRESH

public static final int DEFAULT_TRUST_INFO_REFRESH
Default value of the "trustInfoRefresh" property, 60 .

See Also:
Constant Field Values

DEFAULT_MAX_REQS

public static final int DEFAULT_MAX_REQS
Default value of the "maximumRequests" property, 200 .

See Also:
Constant Field Values

DEFAULT_CONN_TIMEOUT

public static final int DEFAULT_CONN_TIMEOUT
Default value of the "connectionTimeout" property, 30 seconds.

See Also:
Constant Field Values

DEFAULT_REC_BUFF_SIZE

public static final int DEFAULT_REC_BUFF_SIZE
Default value of the "receiveBufferSize" property, 16384 kilobytes.

See Also:
Constant Field Values

DEFAULT_SEND_BUFF_SIZE

public static final int DEFAULT_SEND_BUFF_SIZE
Default value of the "sendBufferSize" property, 16384 kilobytes.

See Also:
Constant Field Values
Constructor Detail

AbstractIniConfigurationParser

public AbstractIniConfigurationParser()
Method Detail

getConnectionTimeout

protected int getConnectionTimeout(org.ini4j.Profile.Section configSection)
Gets the value of the "connectionTimeout" property from the configuration section. If the property is not present or is not valid the default value of 30 will be used.

Parameters:
configSection - configuration section from which to extract the value
Returns:
the value

getMaximumRequests

protected int getMaximumRequests(org.ini4j.Profile.Section configSection)
Gets the value of the "maximumRequests" property from the configuration section. If the property is not present or is not valid the default value of 200 will be used.

Parameters:
configSection - configuration section from which to extract the value
Returns:
the value

getReceiveBufferSize

protected int getReceiveBufferSize(org.ini4j.Profile.Section configSection)
Gets the value of the "receiveBufferSize" property from the configuration section. If the property is not present or is not valid the default value of 16384 will be used.

Parameters:
configSection - configuration section from which to extract the value
Returns:
the value

getSendBufferSize

protected int getSendBufferSize(org.ini4j.Profile.Section configSection)
Gets the value of the "sendBufferSize" property from the configuration section. If the property is not present or is not valid the default value of 16384 will be used.

Parameters:
configSection - configuration section from which to extract the value
Returns:
the value

getTrustMaterialRefreshInterval

protected int getTrustMaterialRefreshInterval(org.ini4j.Profile.Section configSection)
Gets the value of the "trustInfoRefresh" property from the configuration section. If the property is not present or is not valid the default value of 60 will be used.

Parameters:
configSection - configuration section from which to extract the value
Returns:
the value

getX509KeyManager

protected javax.net.ssl.X509KeyManager getX509KeyManager(org.ini4j.Profile.Section configSection)
                                                  throws ConfigurationException
Creates a KeyManager from the "servicePrivateKey" and "serviceCertificate" properties, if they exist.

Parameters:
configSection - current configuration section being processed
Returns:
the constructed key manager, or null if the required properties do not exist
Throws:
ConfigurationException - thrown if there is a problem creating the key manager

getX509TrustMaterialStore

protected org.glite.voms.PKIStore getX509TrustMaterialStore(org.ini4j.Profile.Section configSection)
                                                     throws ConfigurationException
Creates a PKIStore from the "trustInfoDir" property, if they exist. This store holds the material used to validate X.509 certificates.

Parameters:
configSection - current configuration section being processed
Returns:
the constructed trust material store, or null if the required attribute did not exist
Throws:
ConfigurationException - thrown if there is a problem creating the trust manager


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.