Class WBEMConfiguration
- java.lang.Object
-
- org.sblim.cimclient.internal.util.WBEMConfiguration
-
public class WBEMConfiguration extends java.lang.ObjectClass WBEMConfigurationFile is responsible for initializing the the configuration properties from the configuration file.- Threading considerations:
- This class was designed as thread-safe
-
-
Constructor Summary
Constructors Constructor Description WBEMConfiguration(java.util.Properties pDomainProperties)Ctor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowEmptyLocalNameSpacePath()Returns whether the client will allow emptyLOCALNAMESPACEPATHelements in incoming CIM-XML responses.static java.lang.StringgetActiveConfigFullURL()Returns the full URL of the active configuration file.static java.lang.StringgetActiveConfigURL()Returns the URL of the active configuration file.java.lang.StringgetCimXmlEmbObjBuilder()getCimXmlEmbObjBuilderjava.lang.StringgetCimXmlParser()Return the XML parser to use for processing operation responsesjava.lang.StringgetCimXmlTraceStream()Returns the CIM-XML trace stream to be used if application does not set one of its ownstatic java.lang.ExceptiongetConfigurationLoadException()Returns the exception caught during configuration load, load failed.javax.net.SocketFactorygetCustomSocketFactory()Returns the custom socket factoryjava.lang.StringgetDefaultCredentials()getDefaultCredentialsjava.lang.StringgetDefaultPrincipal()getDefaultPrincipaljava.util.PropertiesgetDomainProperties()Returns the domain propertiesjava.lang.StringgetDomainProperty(java.lang.String pKey)Returns a value from the domain properties for a given namestatic WBEMConfigurationgetGlobalConfiguration()Returns the global configurationjava.lang.StringgetHttpAuthenticationModule()Returns the Java class name of http authentication module to useintgetHttpConnectRetriesCount()Returns the number of retries the client will attempt when the connection was refused.intgetHttpContentLengthThreshold()Returns the threshold for the content length retry algorithmintgetHttpPoolSize()Returns the http pool sizeintgetHttpTimeout()Returns the http timeoutjava.lang.StringgetHttpVersion()Returns the http version to usejava.lang.StringgetHttpWwwAuthenticateInfo()Returns the WWW-Authenticate info to use on first requestbooleangetListenerAddSenderIPAddress()Returns whether sender IP property should be added to indicationsintgetListenerBacklog()Returns the backlog that is tolerated before the thread pool creates an additional handlerlonggetListenerDeliveryRetryAttempts()Returns the default value to use for CIM_IndicationService DeliveryRetryAttemptslonggetListenerDeliveryRetryInterval()Returns the default value to use for CIM_IndicationService DeliveryRetryIntervalintgetListenerHttpHeaderTimeout()Returns the http header timeout for indication connection handlersintgetListenerHttpTimeout()Returns the http timeout for indication connection handlersjava.lang.StringgetListenerIndicationTraceFilter()Returns the filter to use for tracing of incoming indications at the FINE levelintgetListenerMaxAllowedTimeouts()Returns the maximum allowed http timeouts before IP is blockedlonggetListenerMaxIdle()Returns the maximal idle time that is tolerated for a connection handlerintgetListenerMaxPoolSize()Returns the maximal pool size for indication connection handlersintgetListenerMaxQueuedEvents()Returns the maximal queue size for indications awaiting deliveryintgetListenerMaxQueueSize()Returns the maximal queue size for pending indication connectionsintgetListenerMinPoolSize()Returns the minimal pool size for indication connection handlersjava.util.PropertiesgetLocalProperties()Returns the properties local to the current threadjava.lang.StringgetLocalProperty(java.lang.String pKey)Returns a value from the local properties for a given namejava.util.logging.LevelgetLogConsoleLevel()Returns the console log leveljava.lang.StringgetLogConsoleType()Returns the console log typeintgetLogFileCount()Returns the log file countjava.util.logging.LevelgetLogFileLevel()Returns the log file leveljava.lang.StringgetLogFileLocation()Returns the log file locationintgetLogFileSizeLimit()Returns the log file size limitintgetReliableIndicationHashtableCapacity()Returns the initial capacity of the hash table used to handle reliable indicationsintgetSocketConnectTimeout()Returns the socket connect timeoutintgetSocketIdleTimeout()Returns the socket idle timeoutjava.lang.StringgetSslClientCipherSuitesToDisable()Returns the comma-separated list of cipher suites to be disabled by client.booleangetSslClientPeerVerification()Returns whether the client will attempt to authenticate the CIMOMjava.lang.StringgetSslClientProtocol()getSslClientProtocoljava.lang.StringgetSslKeyManagerAlgorithm()Returns the certificate algorithm the key manager will usejava.lang.StringgetSslKeyStorePassword()Returns the password of the keystore.java.lang.StringgetSslKeyStorePath()Returns the file path of the keystore.java.lang.StringgetSslKeyStoreType()Returns the type of the keystore.java.lang.StringgetSslListenerCipherSuitesToDisable()Returns the comma-separated list of cipher suites to be disabled by listener.java.lang.StringgetSslListenerPeerVerification()Returns how the listener will handle to authentication of the indication sender endpoint.java.lang.StringgetSslListenerProtocol()getSslListenerProtocoljava.lang.StringgetSslProtocol()getSslProtocoljava.lang.StringgetSslServerSocketProvider()Returns the JSSE provider to use for creating ssl server socketsjava.lang.StringgetSslSocketProvider()Returns the JSSE provider to use for creating ssl client socketsjava.lang.StringgetSslTrustManagerAlgorithm()Returns the certificate algorithm the trust manager will usejava.lang.StringgetSslTrustStorePassword()Returns the password of the truststore.java.lang.StringgetSslTrustStorePath()Returns the file path of the truststore.java.lang.StringgetSslTrustStoreType()Returns the type of the truststore.intgetTraceFileCount()Returns the trace file countjava.util.logging.LevelgetTraceFileLevel()Returns the trace file leveljava.lang.StringgetTraceFileLocation()Returns the trace file locationintgetTraceFileSizeLimit()Returns the trace file countbooleanisCimXmlTracingEnabled()Returns the state of CIM-XML tracingstatic booleanisConfigurationLoadSuccessful()Returns if the configuration was successfully loaded from the configuration filebooleanisDefaultAuthorizationEnabled()isDefaultAuthorizationEnabledbooleanisGlobal()Returns whether this configuration is the global onebooleanisGzipEncodingEnabled()Returns the state of gzip encoding enablement.booleanisHttpChunked()Returns the state of chunking enablementbooleanisHttpContentLengthRetryEnabled()Returns if the content length retry feature is enabledbooleanisHttpMPost()Returns the state of MPOST enablementbooleanisReliableIndicationEnabled()Returns the state of reliable indication supportstatic voidloadGlobalConfiguration()Loads the global configuration from the configuration filebooleanperformSslHandshake()performSslHandshakevoidsetCustomSocketFactory(javax.net.SocketFactory pFactory)Sets a custom socket factory.voidsetDomainProperties(java.util.Properties pDomainProperties)Sets the domain propertiesvoidsetDomainProperty(java.lang.String pKey, java.lang.String pValue)Sets a property value of the domain propertiesvoidsetLocalProperties(java.util.Properties pLocalProperties)Sets the properties local to the current threadvoidsetLocalProperty(java.lang.String pKey, java.lang.String pValue)Sets a property value of the local propertiesbooleansocketConnectWithTimeout()socketConnectWithTimeoutbooleanstrictEmbObjTypes()strictEmbObjTypesbooleansynchronizedSslHandshake()synchronizedSslHandshakebooleansynchronizeNumericKeyDataTypes()Returns whether the client will synchronize the data types of all numeric keys in aCIMInstance'sCIMObjectPathmatch those of the corresponding keys within theCIMInstance'sCIMProperty[].booleanupperCaseEmbObjEntities()upperCaseEmbObjEntitiesbooleanverifyJavaLangDoubleStrings()Returns whether the client will attempt to verify strings passed into thejava.lang.Doubleconstructor or itsparseDoublemethod won't hang the JVM in an infinite loop.
-
-
-
Constructor Detail
-
WBEMConfiguration
public WBEMConfiguration(java.util.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 theSystemclass.- Throws:
java.lang.NullPointerException- If pDomainProperties isnull
-
-
Method Detail
-
loadGlobalConfiguration
public static void loadGlobalConfiguration()
Loads the global configuration from the configuration file
-
getActiveConfigURL
public static java.lang.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.
-
getActiveConfigFullURL
public static java.lang.String getActiveConfigFullURL()
Returns the full URL of the active configuration file. This is the file used to initialize the global configuration.- Returns:
- The full URL of the active configuration file.
-
isConfigurationLoadSuccessful
public static boolean isConfigurationLoadSuccessful()
Returns if the configuration was successfully loaded from the configuration file- Returns:
trueif the configuration was successfully loaded from the configuration file,falseotherwise
-
getGlobalConfiguration
public static WBEMConfiguration getGlobalConfiguration()
Returns the global configuration- Returns:
- The global configuration
-
getConfigurationLoadException
public static java.lang.Exception getConfigurationLoadException()
Returns the exception caught during configuration load, load failed.- Returns:
- The exception or
nullif none was caught.
-
isGlobal
public boolean isGlobal()
Returns whether this configuration is the global one- Returns:
trueif this is the global configuration
-
getDomainProperties
public java.util.Properties getDomainProperties()
Returns the domain properties- Returns:
- The domain properties.
-
setDomainProperties
public void setDomainProperties(java.util.Properties pDomainProperties)
Sets the domain properties- Parameters:
pDomainProperties- The new value
-
getDomainProperty
public java.lang.String getDomainProperty(java.lang.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(java.lang.String pKey, java.lang.String pValue)Sets a property value of the domain properties- Parameters:
pKey- The name of propertypValue- The new value
-
getLocalProperties
public java.util.Properties getLocalProperties()
Returns the properties local to the current thread- Returns:
- The local properties.
-
setLocalProperties
public void setLocalProperties(java.util.Properties pLocalProperties)
Sets the properties local to the current thread- Parameters:
pLocalProperties- The new value
-
getLocalProperty
public java.lang.String getLocalProperty(java.lang.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(java.lang.String pKey, java.lang.String pValue)Sets a property value of the local properties- Parameters:
pKey- The name of propertypValue- The new value
-
setCustomSocketFactory
public void setCustomSocketFactory(javax.net.SocketFactory pFactory)
Sets a custom socket factory.- Parameters:
pFactory- The factory
-
getCustomSocketFactory
public javax.net.SocketFactory getCustomSocketFactory()
Returns the custom socket factory- Returns:
- The factory if set,
nullotherwise
-
getLogConsoleLevel
public java.util.logging.Level getLogConsoleLevel()
Returns the console log level- Returns:
- The console log level
-
getLogConsoleType
public java.lang.String getLogConsoleType()
Returns the console log type- Returns:
- The console log type
-
getLogFileLevel
public java.util.logging.Level getLogFileLevel()
Returns the log file level- Returns:
- The log file level
-
getLogFileLocation
public java.lang.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 java.util.logging.Level getTraceFileLevel()
Returns the trace file level- Returns:
- The trace file level
-
getTraceFileLocation
public java.lang.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 java.lang.String getHttpAuthenticationModule()
Returns the Java class name of http authentication module to use- Returns:
- The http authentication module's class name
-
getHttpWwwAuthenticateInfo
public java.lang.String getHttpWwwAuthenticateInfo()
Returns the WWW-Authenticate info to use on first request- Returns:
- The WWW-Authenticate info
-
isHttpMPost
public boolean isHttpMPost()
Returns the state of MPOST enablement- Returns:
trueif MPOST is enabled,falseotherwise
-
isHttpChunked
public boolean isHttpChunked()
Returns the state of chunking enablement- Returns:
trueif chunking is enabled,falseotherwise
-
getHttpVersion
public java.lang.String getHttpVersion()
Returns the http version to use- Returns:
- The http version
-
getSslKeyStorePath
public java.lang.String getSslKeyStorePath()
Returns the file path of the keystore.- Returns:
- The keystore file path.
-
getSslKeyStoreType
public java.lang.String getSslKeyStoreType()
Returns the type of the keystore.- Returns:
- The keystore type.
-
getSslKeyStorePassword
public java.lang.String getSslKeyStorePassword()
Returns the password of the keystore.- Returns:
- The keystore password.
-
getSslTrustStorePath
public java.lang.String getSslTrustStorePath()
Returns the file path of the truststore.- Returns:
- The truststore file path.
-
getSslTrustStoreType
public java.lang.String getSslTrustStoreType()
Returns the type of the truststore.- Returns:
- The truststore type.
-
getSslTrustStorePassword
public java.lang.String getSslTrustStorePassword()
Returns the password of the truststore.- Returns:
- The truststore password.
-
getSslSocketProvider
public java.lang.String getSslSocketProvider()
Returns the JSSE provider to use for creating ssl client sockets- Returns:
- The JSSE provider for client sockets
-
getSslServerSocketProvider
public java.lang.String getSslServerSocketProvider()
Returns the JSSE provider to use for creating ssl server sockets- Returns:
- The JSSE provider for server sockets
-
getSslProtocol
public java.lang.String getSslProtocol()
getSslProtocol- Returns:
- The SSL protocol for SSLContext.getInstance()
-
getSslClientProtocol
public java.lang.String getSslClientProtocol()
getSslClientProtocol- Returns:
- The SSL protocol for SSLContext.getInstance() for client
-
getSslListenerProtocol
public java.lang.String getSslListenerProtocol()
getSslListenerProtocol- Returns:
- The SSL protocol for SSLContext.getInstance() for listener
-
getSslKeyManagerAlgorithm
public java.lang.String getSslKeyManagerAlgorithm()
Returns the certificate algorithm the key manager will use- Returns:
- The key mangers algorithm
-
getSslTrustManagerAlgorithm
public java.lang.String getSslTrustManagerAlgorithm()
Returns the certificate algorithm the trust manager will use- Returns:
- The trust mangers algorithm
-
getSslClientPeerVerification
public boolean getSslClientPeerVerification()
Returns whether the client will attempt to authenticate the CIMOM- Returns:
trueif the client will attempt to authenticate the CIMOM by verifying the server certificatefalseotherwise
-
getSslListenerPeerVerification
public java.lang.String getSslListenerPeerVerification()
Returns how the listener will handle to authentication of the indication sender endpoint.- Returns:
- The listener peer verification mode
-
getSslClientCipherSuitesToDisable
public java.lang.String getSslClientCipherSuitesToDisable()
Returns the comma-separated list of cipher suites to be disabled by client.- Returns:
- The list of cipher suites
-
getSslListenerCipherSuitesToDisable
public java.lang.String getSslListenerCipherSuitesToDisable()
Returns the comma-separated list of cipher suites to be disabled by listener.- Returns:
- The list of cipher suites
-
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:
trueif content length retry is enabled,falseotherwise
-
getHttpContentLengthThreshold
public int getHttpContentLengthThreshold()
Returns the threshold for the content length retry algorithm- Returns:
- The threshold
-
getCimXmlParser
public java.lang.String getCimXmlParser()
Return the XML parser to use for processing operation responses- Returns:
- The XML parser
-
getCimXmlEmbObjBuilder
public java.lang.String getCimXmlEmbObjBuilder()
getCimXmlEmbObjBuilder- Returns:
- configuration property for the embedded object builder
-
strictEmbObjTypes
public boolean strictEmbObjTypes()
strictEmbObjTypes- Returns:
- true if EmbeddedObject exactly means Embedded Class
-
upperCaseEmbObjEntities
public boolean upperCaseEmbObjEntities()
upperCaseEmbObjEntities- Returns:
- true if "EMBEDDEDOBJECT" entity, false if "EmbeddedObject"
-
performSslHandshake
public boolean performSslHandshake()
performSslHandshake- Returns:
- true if SSL handshakes should take place
-
synchronizedSslHandshake
public boolean synchronizedSslHandshake()
synchronizedSslHandshake- Returns:
- true if SSL handshakes should be synchronized
-
socketConnectWithTimeout
public boolean socketConnectWithTimeout()
socketConnectWithTimeout- Returns:
- true if socket connections should be attempted with a timeout
-
getSocketConnectTimeout
public int getSocketConnectTimeout()
Returns the socket connect timeout- Returns:
- The socket connect timeout
-
getSocketIdleTimeout
public int getSocketIdleTimeout()
Returns the socket idle timeout- Returns:
- The socket idle timeout
-
isDefaultAuthorizationEnabled
public boolean isDefaultAuthorizationEnabled()
isDefaultAuthorizationEnabled- Returns:
- true if default authorization is enabled
-
getDefaultPrincipal
public java.lang.String getDefaultPrincipal()
getDefaultPrincipal- Returns:
- default value of Principal
-
getDefaultCredentials
public java.lang.String getDefaultCredentials()
getDefaultCredentials- Returns:
- default value of Credentials
-
isCimXmlTracingEnabled
public boolean isCimXmlTracingEnabled()
Returns the state of CIM-XML tracing- Returns:
trueif tracing is enabled,falseotherwise
-
getCimXmlTraceStream
public java.lang.String getCimXmlTraceStream()
Returns the CIM-XML trace stream to be used if application does not set one of its own- Returns:
- The trace stream
-
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
-
getListenerHttpHeaderTimeout
public int getListenerHttpHeaderTimeout()
Returns the http header timeout for indication connection handlers- Returns:
- The timeout
-
getListenerMaxAllowedTimeouts
public int getListenerMaxAllowedTimeouts()
Returns the maximum allowed http timeouts before IP is blocked- Returns:
- The maximum allowed timeouts
-
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
-
getListenerMaxQueueSize
public int getListenerMaxQueueSize()
Returns the maximal queue size for pending indication connections- Returns:
- The maximal queue size
-
getListenerMaxIdle
public long getListenerMaxIdle()
Returns the maximal idle time that is tolerated for a connection handler- Returns:
- The maximal idle time
-
getListenerMaxQueuedEvents
public int getListenerMaxQueuedEvents()
Returns the maximal queue size for indications awaiting delivery- Returns:
- The maximal queue size
-
isReliableIndicationEnabled
public boolean isReliableIndicationEnabled()
Returns the state of reliable indication support- Returns:
trueif reliable indication support is enabled,falseotherwise
-
getListenerDeliveryRetryAttempts
public long getListenerDeliveryRetryAttempts()
Returns the default value to use for CIM_IndicationService DeliveryRetryAttempts- Returns:
- The default value
-
getListenerDeliveryRetryInterval
public long getListenerDeliveryRetryInterval()
Returns the default value to use for CIM_IndicationService DeliveryRetryInterval- Returns:
- The default value
-
getReliableIndicationHashtableCapacity
public int getReliableIndicationHashtableCapacity()
Returns the initial capacity of the hash table used to handle reliable indications- Returns:
- The default value
-
getListenerIndicationTraceFilter
public java.lang.String getListenerIndicationTraceFilter()
Returns the filter to use for tracing of incoming indications at the FINE level- Returns:
- The indication trace filter
-
getListenerAddSenderIPAddress
public boolean getListenerAddSenderIPAddress()
Returns whether sender IP property should be added to indications- Returns:
trueif sender IP property should be added to indications,falseotherwise
-
verifyJavaLangDoubleStrings
public boolean verifyJavaLangDoubleStrings()
Returns whether the client will attempt to verify strings passed into thejava.lang.Doubleconstructor or itsparseDoublemethod won't hang the JVM in an infinite loop.- Returns:
trueif the client will attempt to verify strings passed toDouble,falseotherwise
-
synchronizeNumericKeyDataTypes
public boolean synchronizeNumericKeyDataTypes()
Returns whether the client will synchronize the data types of all numeric keys in aCIMInstance'sCIMObjectPathmatch those of the corresponding keys within theCIMInstance'sCIMProperty[].- Returns:
trueif the client will synchronizeCIMInstancenumeric key data types,falseotherwise
-
isGzipEncodingEnabled
public boolean isGzipEncodingEnabled()
Returns the state of gzip encoding enablement.- Returns:
trueif gzip encoding is enabled,falseotherwise
-
allowEmptyLocalNameSpacePath
public boolean allowEmptyLocalNameSpacePath()
Returns whether the client will allow emptyLOCALNAMESPACEPATHelements in incoming CIM-XML responses.- Returns:
trueif CIM-XML parser should allow emptyLOCALNAMESPACEPATHelements in incoming responses,falseotherwise
-
-