org.sblim.cimclient.internal.util
Class WBEMConfiguration

java.lang.Object
  extended by org.sblim.cimclient.internal.util.WBEMConfiguration

public class WBEMConfiguration
extends Object

Class WBEMConfigurationFile is responsible for initializing the the configuration properties from the configuration file.

Threading considerations:
This class was designed as thread-safe

Constructor Summary
WBEMConfiguration(Properties pDomainProperties)
          Ctor.
 
Method Summary
static String getActiveConfigURL()
          Returns the URL of the active configuration file.
 String getCimXmlEmbObjBuilder()
          getCimXmlEmbObjBuilder
 String getCimXmlParser()
          Return the XML parser to use for processing operation responses
static Exception getConfigurationLoadException()
          Returns the exception caught during configuration load, load failed.
 SocketFactory getCustomSocketFactory()
          Returns the custom socket factory
 String getDefaultCredentials()
          getDefaultCredentials
 String getDefaultPrincipal()
          getDefaultPrincipal
 Properties getDomainProperties()
          Returns the domain properties
 String getDomainProperty(String pKey)
          Returns a value from the domain properties for a given name
static WBEMConfiguration getGlobalConfiguration()
          Returns the global configuration
 String getHttpAuthenticationModule()
          Returns the Java class name of http authentication module to use
 int getHttpConnectRetriesCount()
          Returns the number of retries the client will attempt when the connection was refused.
 int getHttpContentLengthThreshold()
          Returns the threshold for the content length retry algorithm
 int getHttpPoolSize()
          Returns the http pool size
 int getHttpTimeout()
          Returns the http timeout
 String getHttpVersion()
          Returns the http version to use
 int getListenerBacklog()
          Returns the backlog that is tolerated before the thread pool creates an additional handler
 int getListenerHttpTimeout()
          Returns the http timeout for indication connection handlers
 long getListenerMaxIdle()
          Returns the maximal idle time that is tolerated for a connection handler
 int getListenerMaxPoolSize()
          Returns the maximal pool size for indication connection handlers
 int getListenerMinPoolSize()
          Returns the minimal pool size for indication connection handlers
 Properties getLocalProperties()
          Returns the properties local to the current thread
 String getLocalProperty(String pKey)
          Returns a value from the local properties for a given name
 Level getLogConsoleLevel()
          Returns the console log level
 String getLogConsoleType()
          Returns the console log type
 int getLogFileCount()
          Returns the log file count
 Level getLogFileLevel()
          Returns the log file level
 String getLogFileLocation()
          Returns the log file location
 int getLogFileSizeLimit()
          Returns the log file size limit
 String getSslKeyManagerAlgorithm()
          Returns the certificate algorithm the key manager will use
 String getSslKeyStorePassword()
          Returns the password of the keystore.
 String getSslKeyStorePath()
          Returns the file path of the keystore.
 String getSslKeyStoreType()
          Returns the type of the keystore.
 String getSslProtocol()
          getSslProtocol
 String getSslServerSocketProvider()
          Returns the JSSE provider to use for creating ssl server sockets
 String getSslSocketProvider()
          Returns the JSSE provider to use for creating ssl client sockets
 String getSslTrustManagerAlgorithm()
          Returns the certificate algorithm the trust manager will use
 String getSslTrustStorePassword()
          Returns the password of the truststore.
 String getSslTrustStorePath()
          Returns the file path of the truststore.
 String getSslTrustStoreType()
          Returns the type of the truststore.
 int getTraceFileCount()
          Returns the trace file count
 Level getTraceFileLevel()
          Returns the trace file level
 String getTraceFileLocation()
          Returns the trace file location
 int getTraceFileSizeLimit()
          Returns the trace file count
 boolean isCimXmlTracingEnabled()
          Returns the state of CIM-XML tracing
static boolean isConfigurationLoadSuccessful()
          Returns if the configuration was successfully loaded from the configuration file
 boolean isDefaultAuthorizationEnabled()
          isDefaultAuthorizationEnabled
 boolean isGlobal()
          Returns whether this configuration is the global one
 boolean isHttpChunked()
          Returns the state of chunking enablement
 boolean isHttpContentLengthRetryEnabled()
          Returns if the content length retry feature is enabled
 boolean isHttpMPost()
          Returns the state of MPOST enablement
static void loadGlobalConfiguration()
          Loads the global configuration from the configuration file
 void setCustomSocketFactory(SocketFactory pFactory)
          Sets a custom socket factory.
 void setDomainProperties(Properties pDomainProperties)
          Sets the domain properties
 void setDomainProperty(String pKey, String pValue)
          Sets a property value of the domain properties
 void setLocalProperties(Properties pLocalProperties)
          Sets the properties local to the current thread
 void setLocalProperty(String pKey, String pValue)
          Sets a property value of the local properties
 boolean strictEmbObjTypes()
          strictEmbObjTypes
 boolean synchronizedSslHandshake()
          synchronizedSslHandshake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBEMConfiguration

public WBEMConfiguration(Properties pDomainProperties)
Ctor.

Parameters:
pDomainProperties - The domain specific properties of this configuration. Domain specific properties are treated as an overlay on the global properties in the System class.
Throws:
NullPointerException - If pDomainProperties is null
Method Detail

loadGlobalConfiguration

public static void loadGlobalConfiguration()
Loads the global configuration from the configuration file


getActiveConfigURL

public static String getActiveConfigURL()
Returns the URL of the active configuration file. This is the file used to initialize the global configuration.

Returns:
The URL of the active configuration file.

isConfigurationLoadSuccessful

public static boolean isConfigurationLoadSuccessful()
Returns if the configuration was successfully loaded from the configuration file

Returns:
true if the configuration was successfully loaded from the configuration file, false otherwise

getGlobalConfiguration

public static WBEMConfiguration getGlobalConfiguration()
Returns the global configuration

Returns:
The global configuration

getConfigurationLoadException

public static Exception getConfigurationLoadException()
Returns the exception caught during configuration load, load failed.

Returns:
The exception or null if none was caught.

isGlobal

public boolean isGlobal()
Returns whether this configuration is the global one

Returns:
true if this is the global configuration

getDomainProperties

public Properties getDomainProperties()
Returns the domain properties

Returns:
The domain properties.

setDomainProperties

public void setDomainProperties(Properties pDomainProperties)
Sets the domain properties

Parameters:
pDomainProperties - The new value

getDomainProperty

public String getDomainProperty(String pKey)
Returns a value from the domain properties for a given name

Parameters:
pKey - The name of the property
Returns:
The value

setDomainProperty

public void setDomainProperty(String pKey,
                              String pValue)
Sets a property value of the domain properties

Parameters:
pKey - The name of property
pValue - The new value

getLocalProperties

public Properties getLocalProperties()
Returns the properties local to the current thread

Returns:
The local properties.

setLocalProperties

public void setLocalProperties(Properties pLocalProperties)
Sets the properties local to the current thread

Parameters:
pLocalProperties - The new value

getLocalProperty

public String getLocalProperty(String pKey)
Returns a value from the local properties for a given name

Parameters:
pKey - The name of the property
Returns:
The value

setLocalProperty

public void setLocalProperty(String pKey,
                             String pValue)
Sets a property value of the local properties

Parameters:
pKey - The name of property
pValue - The new value

setCustomSocketFactory

public void setCustomSocketFactory(SocketFactory pFactory)
Sets a custom socket factory.

Parameters:
pFactory - The factory

getCustomSocketFactory

public SocketFactory getCustomSocketFactory()
Returns the custom socket factory

Returns:
The factory if set, null otherwise

getLogConsoleLevel

public Level getLogConsoleLevel()
Returns the console log level

Returns:
The console log level

getLogConsoleType

public String getLogConsoleType()
Returns the console log type

Returns:
The console log type

getLogFileLevel

public Level getLogFileLevel()
Returns the log file level

Returns:
The log file level

getLogFileLocation

public String getLogFileLocation()
Returns the log file location

Returns:
The log file location

getLogFileCount

public int getLogFileCount()
Returns the log file count

Returns:
The log file count

getLogFileSizeLimit

public int getLogFileSizeLimit()
Returns the log file size limit

Returns:
The log file size limit

getTraceFileLevel

public Level getTraceFileLevel()
Returns the trace file level

Returns:
The trace file level

getTraceFileLocation

public String getTraceFileLocation()
Returns the trace file location

Returns:
The trace file location

getTraceFileCount

public int getTraceFileCount()
Returns the trace file count

Returns:
The trace file count

getTraceFileSizeLimit

public int getTraceFileSizeLimit()
Returns the trace file count

Returns:
The trace file count

getHttpTimeout

public int getHttpTimeout()
Returns the http timeout

Returns:
The http timeout

getHttpPoolSize

public int getHttpPoolSize()
Returns the http pool size

Returns:
The http pool size

getHttpAuthenticationModule

public String getHttpAuthenticationModule()
Returns the Java class name of http authentication module to use

Returns:
The http authentication module's class name

isHttpMPost

public boolean isHttpMPost()
Returns the state of MPOST enablement

Returns:
true if MPOST is enabled, false otherwise

isHttpChunked

public boolean isHttpChunked()
Returns the state of chunking enablement

Returns:
true if chunking is enabled, false otherwise

getHttpVersion

public String getHttpVersion()
Returns the http version to use

Returns:
The http version

getSslKeyStorePath

public String getSslKeyStorePath()
Returns the file path of the keystore.

Returns:
The keystore file path.

getSslKeyStoreType

public String getSslKeyStoreType()
Returns the type of the keystore.

Returns:
The keystore type.

getSslKeyStorePassword

public String getSslKeyStorePassword()
Returns the password of the keystore.

Returns:
The keystore password.

getSslTrustStorePath

public String getSslTrustStorePath()
Returns the file path of the truststore.

Returns:
The truststore file path.

getSslTrustStoreType

public String getSslTrustStoreType()
Returns the type of the truststore.

Returns:
The truststore type.

getSslTrustStorePassword

public String getSslTrustStorePassword()
Returns the password of the truststore.

Returns:
The truststore password.

getSslSocketProvider

public String getSslSocketProvider()
Returns the JSSE provider to use for creating ssl client sockets

Returns:
The JSSE provider for client sockets

getSslServerSocketProvider

public String getSslServerSocketProvider()
Returns the JSSE provider to use for creating ssl server sockets

Returns:
The JSSE provider for server sockets

getSslProtocol

public String getSslProtocol()
getSslProtocol

Returns:
The SSL protocol for SSLContext.getInstance()

getSslKeyManagerAlgorithm

public String getSslKeyManagerAlgorithm()
Returns the certificate algorithm the key manager will use

Returns:
The key mangers algorithm

getSslTrustManagerAlgorithm

public String getSslTrustManagerAlgorithm()
Returns the certificate algorithm the trust manager will use

Returns:
The trust mangers algorithm

getHttpConnectRetriesCount

public int getHttpConnectRetriesCount()
Returns the number of retries the client will attempt when the connection was refused.

Returns:
The number of retries

isHttpContentLengthRetryEnabled

public boolean isHttpContentLengthRetryEnabled()
Returns if the content length retry feature is enabled

Returns:
true if content length retry is enabled, false otherwise

getHttpContentLengthThreshold

public int getHttpContentLengthThreshold()
Returns the threshold for the content length retry algorithm

Returns:
The threshold

getCimXmlParser

public String getCimXmlParser()
Return the XML parser to use for processing operation responses

Returns:
The XML parser

getCimXmlEmbObjBuilder

public String getCimXmlEmbObjBuilder()
getCimXmlEmbObjBuilder

Returns:
configuration property for the embedded object builder

strictEmbObjTypes

public boolean strictEmbObjTypes()
strictEmbObjTypes

Returns:
true if EmbeddedObject exactly means Embedded Class

synchronizedSslHandshake

public boolean synchronizedSslHandshake()
synchronizedSslHandshake

Returns:
true if SSL handshakes should be synchronized

isDefaultAuthorizationEnabled

public boolean isDefaultAuthorizationEnabled()
isDefaultAuthorizationEnabled

Returns:
true if default authorization is enabled

getDefaultPrincipal

public String getDefaultPrincipal()
getDefaultPrincipal

Returns:
default value of Principal

getDefaultCredentials

public String getDefaultCredentials()
getDefaultCredentials

Returns:
default value of Credentials

isCimXmlTracingEnabled

public boolean isCimXmlTracingEnabled()
Returns the state of CIM-XML tracing

Returns:
true if tracing is enabled, false otherwise

getListenerBacklog

public int getListenerBacklog()
Returns the backlog that is tolerated before the thread pool creates an additional handler

Returns:
The backlog

getListenerHttpTimeout

public int getListenerHttpTimeout()
Returns the http timeout for indication connection handlers

Returns:
The timeout

getListenerMaxPoolSize

public int getListenerMaxPoolSize()
Returns the maximal pool size for indication connection handlers

Returns:
The maximal pool size

getListenerMinPoolSize

public int getListenerMinPoolSize()
Returns the minimal pool size for indication connection handlers

Returns:
The minimal pool size

getListenerMaxIdle

public long getListenerMaxIdle()
Returns the maximal idle time that is tolerated for a connection handler

Returns:
The maximal idle time


Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.