org.glite.authz.common.config
Class AbstractConfigurationBuilder<ConfigType extends AbstractConfiguration>

java.lang.Object
  extended by org.glite.authz.common.config.AbstractConfigurationBuilder<ConfigType>
Type Parameters:
ConfigType - the type of configuration object built
Direct Known Subclasses:
AbstractServiceConfigurationBuilder

@NotThreadSafe
public abstract class AbstractConfigurationBuilder<ConfigType extends AbstractConfiguration>
extends java.lang.Object

Base class for builders of AbstractConfiguration objects.


Constructor Summary
protected AbstractConfigurationBuilder()
          Constructor.
protected AbstractConfigurationBuilder(AbstractConfiguration prototype)
          Constructor thats creates a builder factory with the same settings as the given prototype configuration.
 
Method Summary
abstract  ConfigType build()
          Builds the configuration represented by the current set properties.
 int getConnectionTimeout()
          Gets the connection socket timeout, in milliseconds.
 javax.net.ssl.X509KeyManager getKeyManager()
          Gets the credential used by this service to create SSL connections and digital signatures.
 java.lang.String getLoggingConfigFilePath()
          Gets the path to the logging file configuration location.
 int getMaxConnections()
          Gets the maximum number of concurrent connections that may be in-process at one time.
 int getReceiveBufferSize()
          Gets the size of the buffer, in bytes, used when receiving data.
 int getSendBufferSize()
          Gets the size of the buffer, in bytes, used when sending data.
 org.glite.voms.PKIStore getTrustMaterialStore()
          Gets the store containing the trust material used to validate X509 certificates.
protected  void populateConfiguration(ConfigType config)
          Populates the given configuration with information from this builder.
 void setConnectionTimeout(int timeout)
          Sets the HTTP connection timeout, in milliseconds.
 void setKeyManager(javax.net.ssl.X509KeyManager manager)
          Sets the credential used by this service to create SSL connections and digital signatures.
 void setLoggingConfigFilePath(java.lang.String path)
          Sets the path to the logging file configuration location.
 void setMaxConnections(int max)
          Sets the maximum number of concurrent connections that may be in-process at one time.
 void setReceiveBufferSize(int size)
          Sets size of the buffer, in bytes, used when receiving data.
 void setSendBufferSize(int size)
          Sets the size of the buffer, in bytes, used when sending data.
 void setX509TrustMaterial(org.glite.voms.PKIStore material)
          Sets the store containing the trust material used to validate X509 certificates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConfigurationBuilder

protected AbstractConfigurationBuilder()
Constructor.


AbstractConfigurationBuilder

protected AbstractConfigurationBuilder(AbstractConfiguration prototype)
Constructor thats creates a builder factory with the same settings as the given prototype configuration.

Parameters:
prototype - the prototype configuration whose values will be used to initialize this builder
Method Detail

build

public abstract ConfigType build()
Builds the configuration represented by the current set properties. Please note that configuration builders are not threadsafe. So care should be taken that another thread does not change properties while the configuration is being built.

Returns:
the constructed configuration

getConnectionTimeout

public int getConnectionTimeout()
Gets the connection socket timeout, in milliseconds.

Returns:
connection socket timeout, in milliseconds

getLoggingConfigFilePath

public java.lang.String getLoggingConfigFilePath()
Gets the path to the logging file configuration location.

Returns:
path to the logging file configuration location

getMaxConnections

public int getMaxConnections()
Gets the maximum number of concurrent connections that may be in-process at one time.

Returns:
maximum number of concurrent connections that may be in-process at one time

getReceiveBufferSize

public int getReceiveBufferSize()
Gets the size of the buffer, in bytes, used when receiving data.

Returns:
Size of the buffer, in bytes, used when receiving data

getSendBufferSize

public int getSendBufferSize()
Gets the size of the buffer, in bytes, used when sending data.

Returns:
size of the buffer, in bytes, used when sending data

getKeyManager

public javax.net.ssl.X509KeyManager getKeyManager()
Gets the credential used by this service to create SSL connections and digital signatures.

Returns:
credential used by this service to create SSL connections and digital signatures

getTrustMaterialStore

public org.glite.voms.PKIStore getTrustMaterialStore()
Gets the store containing the trust material used to validate X509 certificates.

Returns:
store containing the trust material used to validate X509 certificates

populateConfiguration

protected void populateConfiguration(ConfigType config)
Populates the given configuration with information from this builder.

Parameters:
config - the configuration to populate

setConnectionTimeout

public void setConnectionTimeout(int timeout)
Sets the HTTP connection timeout, in milliseconds.

Parameters:
timeout - HTTP connection timeout, in milliseconds; may not be less than 1

setLoggingConfigFilePath

public void setLoggingConfigFilePath(java.lang.String path)
Sets the path to the logging file configuration location.

Parameters:
path - path to the logging file configuration location

setMaxConnections

public void setMaxConnections(int max)
Sets the maximum number of concurrent connections that may be in-process at one time.

Parameters:
max - maximum number of concurrent connections that may be in-process at one time; may not be less than 1

setReceiveBufferSize

public void setReceiveBufferSize(int size)
Sets size of the buffer, in bytes, used when receiving data.

Parameters:
size - size of the buffer, in bytes, used when receiving data; may not be less than 1

setSendBufferSize

public void setSendBufferSize(int size)
Sets the size of the buffer, in bytes, used when sending data.

Parameters:
size - size of the buffer, in bytes, used when sending data; may not be less than 1

setKeyManager

public void setKeyManager(javax.net.ssl.X509KeyManager manager)
Sets the credential used by this service to create SSL connections and digital signatures.

Parameters:
manager - credential used by this service to create SSL connections and digital signatures

setX509TrustMaterial

public void setX509TrustMaterial(org.glite.voms.PKIStore material)
Sets the store containing the trust material used to validate X509 certificates.

Parameters:
material - store containing the trust material used to validate X509 certificates


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