Package org.sblim.wbem.util
Class SessionProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- org.sblim.wbem.util.SessionProperties
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
public class SessionProperties extends java.util.Properties implements java.lang.Cloneable
Provides access to configuration properties which can affect the behavior of the CIM Client, including control over logs/tracing info, connection pool handling, connection timeout, JSSE providers, among others.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DOM_PARSER
Parsing mode 'DOM parser'.static java.lang.String
PEGASUS_LOCAL_AUTHENTICATION
OpenPegasus local authenticationstatic int
PULL_PARSER
Parsing mode 'pull parser'.static int
SAX_PARSER
Parsing moder 'SAX parser'.static java.lang.String
WWW_AUTHENTICATION
Standard HTTP basic or digest authentication
-
Constructor Summary
Constructors Constructor Description SessionProperties()
Constructs a new SessionProperties instance with library defaults applied.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
boolean
getBooleanProperty(java.lang.String key, boolean defaultValue)
Gets the boolean representation of property.int
getConnectionPoolSize()
Gets the connection pool size.int
getContentLength()
Returns an integer that contains the content length that is being used for the retry mechanism.java.io.OutputStream
getDebugOutputStream()
Gets the output stream used to dump some debugging information.java.lang.String
getDefaultCredentials()
Get the current credentials used if the usage of default credentials is enabled.java.lang.String
getDefaultPrincipal()
Get the current principal used if the usage of default credentials is enabled.static SessionProperties
getEnvironmentDefaults()
Returns the environment defaults.static SessionProperties
getGlobalProperties()
Returns the SessionProperties singleton instance representing the global properties.java.lang.String
getHttpAuthenticationModule()
Gets the HTTP authentication moduleint
getHttpTimeOut()
Gets the HTTP connection request time out (in milliseconds).int
getIntProperty(java.lang.String key, int defaultValue)
Gets the integer represetation of property.java.lang.String
getJSSECertificate()
Gets the Certificate Managers name.java.lang.String
getJSSEProtocol()
java.lang.String
getJSSEProtocolHandler()
java.lang.String
getJSSEProvider()
Gets the complete class name for the JSSE provider.java.lang.String
getKeystore()
Gets the path of current keystore.char[]
getKeystorePassword()
Gets the keystore password.java.lang.String
getKeystoreType()
Gets the type of keystore.java.util.logging.Level
getLevelProperty(java.lang.String key, java.util.logging.Level defaultValue)
Gets the boolean representation of property.static SessionProperties
getLibraryDefaults()
Returns the library default properties.java.util.logging.Logger
getLogger()
Gets the default logger for this application.java.util.logging.Level
getLoggerConsoleLevel()
Get the current log level of the console log handler.java.util.logging.Level
getLoggerFileLevel()
Get the current log level of the file log handler.java.lang.String
getLoggerNameSpace()
Get the current used namespace for the logger.java.lang.String
getLoggerOutputFile()
Get the file name, log messages are written to.java.lang.String
getPropertyFile()
Gets the properties file that was applied (by loadProperties() or loadProperties(String) this SessionProperties instance.int
getRetriesNumber()
Get the number of retries that is set for the transmission of the cimXML request.javax.net.SocketFactory
getSocketFactory()
Gets the custom socket factory for client connections.java.lang.String
getStringProperty(java.lang.String key, java.lang.String defaultValue)
Gets the string represetation of property.boolean
getSynchronizedSslHandshake()
Returns a boolean that indicates whether or not SSL handshakes should be synchronized.java.lang.String
getTruststore()
Gets the path of current truststore.java.lang.String
getTruststore_password()
Deprecated.For security reasons instead of this method, char[] getTruststorePassword() should be used.char[]
getTruststorePassword()
Gets the truststore password.int
getXmlParser()
Gets the Xml Parsing mode.boolean
isContentLengthRetryEnabled()
Returns a boolean that indicates whether or not the content lenght retry mechanism is enabled.boolean
isCredentialsDefaultEnabled()
Determines if the usage of the default credentials is enabled or not.boolean
isDebugHttpConnectionPool()
Deprecated.This method is not used anywhere...boolean
isDebugInputStream()
Determines if the response from the CIMOM's (before parsing the XML) will be dumped into the default debugging output stream.boolean
isDebugXMLInput()
Determines if the XML from CIMOM's response will be dumped into the default debugging output stream.boolean
isDebugXMLOutput()
Determines if the XML from request will be dumped into the default debugging output stream.boolean
isGlobal()
Determines if these session properties are the global properties.boolean
isLoggingEnabled()
Determines if logging in general is enabled or not.boolean
loadProperties()
Loads the properties from the default property file.boolean
loadProperties(java.lang.String pPropertyFile)
Loads the properties from the specified file.boolean
loadProperties(java.util.Properties properties)
Loads the properties from the specified properties.void
setConnectionPoolSize(int poolSize)
Specifies the maximum number of connection pools to be maitained alive, and later will be reused for additional request.void
setContentLength(int contentLength)
Determines the content length that is supposed to be used during the retry mechanism.void
setContentLengthRetry(boolean enableContentCheck)
Enables or disables the content length retry mechanism.void
setCredentialsDefaultEnabled(boolean credentialsDefaultEnabled)
Specifies if the usage of the default credentials must be used or not.void
setDebugHttpConnectionPool(boolean enableDebugHTTPPool)
Deprecated.This method is never used at all...void
setDebugInputStream(boolean enableDebugInputStream)
Specifies if the input stream must be dumped into the default debugging output stream.void
setDebugOutputStream(java.io.OutputStream outputStream)
Specifies the default output stream to dump debugging information, including the request/response xml documents.void
setDebugXMLInput(boolean enableDebugXMLInput)
Specifies if the XML response from the CIMOM will be dumped into the default debugging output stream.void
setDebugXMLOutput(boolean enableDebugXMLOutput)
Specifies if the XML from the request will be dumped into the default debugging output stream.void
setDefaultCredentials(java.lang.String credentialsPassword)
Specifies new default credentials to use if the usage of default credentials is enabled.void
setDefaultPrincipal(java.lang.String credentialsUser)
Specifies new default principal to use if the usage of default credentials is enabled.void
setHttpAuthenticationModule(java.lang.String pAuthenticationModule)
Sets the HTTP authentication modulevoid
setHttpTimeOut(int timeOut)
Specifies the time out for HTTP connections.void
setJSSECertificate(java.lang.String jsseCertificateMgr)
Specifies the JSSE certificate manager used for https connection.void
setJSSEProtocol(java.lang.String pProtocol)
void
setJSSEProtocolHandler(java.lang.String handlerClassName)
void
setJSSEProvider(java.lang.String providerClassName)
Specifies the complete class name for the JSSE provider.void
setKeystore(java.lang.String keystore)
Specifies the path of the keystore.void
setKeystore_password(char[] newPassword)
Specifies the password for the keystore.void
setKeystoreType(java.lang.String type)
Specifies the type of the keystore.void
setLogger(java.util.logging.Logger newLogger)
Allows applications to specify externalLogger
to be used by all the CIM clients.
void
setLoggerConsoleLevel(java.util.logging.Level loggerConsoleLevel)
Specifies a new log level for the console log handler.void
setLoggerFileLevel(java.util.logging.Level loggerFileLevel)
Specifies a new log level for the file log handler Supported on the global properties instance only.void
setLoggerNameSpace(java.lang.String loggerNameSpace)
Specifies a new namespace for the logger.void
setLoggerOutputFile(java.lang.String loggerOutputFile)
Specifies a new log file name Supported on the global properties instance only.void
setLoggingEnabled(boolean enableLogging)
Specifies if logging in general is enabled or not.void
setRetriesNumber(int retries)
Specifies the new number of retries that is set for the transmission of the cimXML request.void
setSocketFactory(javax.net.SocketFactory factory)
Specifies the custom socket factory for client connections.void
setSynchronizedSslHandshake(boolean enableSynchronizedSslHandshake)
Enables or disables the synchronization of SSL handshakesvoid
setTruststore(java.lang.String truststore)
Specifies the path of the truststore.void
setTruststore_password(char[] newPassword)
Specifies the password for the truststore.void
setTruststore_password(java.lang.String newPassword)
Deprecated.For security reasons this method should not be used.void
setXmlParser(int parsingMode)
Specifies the xml parsing mode.-
Methods inherited from class java.util.Properties
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Field Detail
-
PULL_PARSER
public static final int PULL_PARSER
Parsing mode 'pull parser'.- See Also:
- Constant Field Values
-
SAX_PARSER
public static final int SAX_PARSER
Parsing moder 'SAX parser'.- See Also:
- Constant Field Values
-
DOM_PARSER
public static final int DOM_PARSER
Parsing mode 'DOM parser'.- See Also:
- Constant Field Values
-
WWW_AUTHENTICATION
public static final java.lang.String WWW_AUTHENTICATION
Standard HTTP basic or digest authentication
-
PEGASUS_LOCAL_AUTHENTICATION
public static final java.lang.String PEGASUS_LOCAL_AUTHENTICATION
OpenPegasus local authentication
-
-
Constructor Detail
-
SessionProperties
public SessionProperties()
Constructs a new SessionProperties instance with library defaults applied.- See Also:
getLibraryDefaults()
-
-
Method Detail
-
getGlobalProperties
public static SessionProperties getGlobalProperties()
Returns the SessionProperties singleton instance representing the global properties. The global properties are applied whenever no session specific properties are specified. The global properties are identical to the environment defaults after startup, but may be modified by the application during runtime.- Returns:
- The global properties
-
getLibraryDefaults
public static SessionProperties getLibraryDefaults()
Returns the library default properties. These are the session properties that would be used if no property files was loaded and no modifications done by the application.- Returns:
- The library defaults
-
getEnvironmentDefaults
public static SessionProperties getEnvironmentDefaults()
Returns the environment defaults. These are the session properties that are used after startup with no modifications done by the application. The properties file is applied.- Returns:
- The environment properties.
- See Also:
loadProperties()
-
getStringProperty
public java.lang.String getStringProperty(java.lang.String key, java.lang.String defaultValue)
Gets the string represetation of property.- Parameters:
key
- a String representing the property name.defaultValue
- default value used in case of an error ocurrs while reading the value.- Returns:
- The
String
value for the related key, otherwise the submitted defaultValue.
-
getIntProperty
public int getIntProperty(java.lang.String key, int defaultValue)
Gets the integer represetation of property.- Parameters:
key
- a String representing the property name.defaultValue
- default value used in case of an error ocurrs while reading the value.- Returns:
- The
int
value for the related key, otherwise the submitted devaultValue
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
Gets the boolean representation of property.- Parameters:
key
- a String representing the property name.defaultValue
- default value used in case of an error ocurrs while reading the value.- Returns:
- The
boolean
value for the related key, otherwise submitted defaultValue
-
getLevelProperty
public java.util.logging.Level getLevelProperty(java.lang.String key, java.util.logging.Level defaultValue)
Gets the boolean representation of property.- Parameters:
key
- a String representing the property name.defaultValue
- default value used in case of an error ocurrs while reading the value.- Returns:
- The
Level
value for the related key, othervide the submitted defaultValue
-
getDebugOutputStream
public java.io.OutputStream getDebugOutputStream()
Gets the output stream used to dump some debugging information.- Returns:
- The currently used
OutputStream
-
setDebugOutputStream
public void setDebugOutputStream(java.io.OutputStream outputStream)
Specifies the default output stream to dump debugging information, including the request/response xml documents.- Parameters:
outputStream
- TheOutputStream
to use
-
getKeystore
public java.lang.String getKeystore()
Gets the path of current keystore.- Returns:
- The path of the current keystore
-
setKeystore
public void setKeystore(java.lang.String keystore)
Specifies the path of the keystore.- Parameters:
keystore
- The path to the keystore
-
getKeystoreType
public java.lang.String getKeystoreType()
Gets the type of keystore.- Returns:
- The type of the keystore (e.g. "JKS", "PKCS12")
-
setKeystoreType
public void setKeystoreType(java.lang.String type)
Specifies the type of the keystore.- Parameters:
type
- The type of the keystore (e.g. "JKS", "PKCS12")
-
getTruststore
public java.lang.String getTruststore()
Gets the path of current truststore.- Returns:
- The path to the truststore
-
setTruststore
public void setTruststore(java.lang.String truststore)
Specifies the path of the truststore.- Parameters:
truststore
- The path to the truststore
-
getTruststore_password
public java.lang.String getTruststore_password()
Deprecated.For security reasons instead of this method, char[] getTruststorePassword() should be used.Gets the truststore password.- Returns:
- The password for the truststore
-
getTruststorePassword
public char[] getTruststorePassword()
Gets the truststore password. Note that this method returns a clone of the object which contains the password. Every single character from the object returned by this method must be reset to 0x00 in order to prevent access to the password by malicious programs.- Returns:
- The password for the truststore
-
setTruststore_password
public void setTruststore_password(java.lang.String newPassword)
Deprecated.For security reasons this method should not be used. Instead setTruststore_password(char[] newPassword) should be used.Specifies the password for the truststore. A null password is used to reset the password.- Parameters:
newPassword
- The new password for the truststore
-
setTruststore_password
public void setTruststore_password(char[] newPassword)
Specifies the password for the truststore. Note that the application is responsable of reseting the newPassword object in order to prevent malicious access to the password.- Parameters:
newPassword
- The new password for the truststore
-
getKeystorePassword
public char[] getKeystorePassword()
Gets the keystore password. Note that this method returns a clone of the object which contains the password. Every single character from the object returned by this method must be reset to 0x00 in order to prevent access to the password by malicious programs.- Returns:
- The password of the keystore
-
setKeystore_password
public void setKeystore_password(char[] newPassword)
Specifies the password for the keystore. Note that the application is responsable of reseting the newPassword object in order to prevent malicious access to the password.- Parameters:
newPassword
- The new password for the truststore
-
getXmlParser
public int getXmlParser()
Gets the Xml Parsing mode.- Returns:
- A value of 0- pullbase, 1 - SAX, 2 - DOM
-
setXmlParser
public void setXmlParser(int parsingMode)
Specifies the xml parsing mode.- Parameters:
parsingMode
- An integer: 0 for pullbase, 1 for SAX, 2 for DOM.- Throws:
java.lang.IllegalArgumentException
- if the parsingMode is not in the range from 0 .. 2.
-
getHttpTimeOut
public int getHttpTimeOut()
Gets the HTTP connection request time out (in milliseconds).- Returns:
- The time out for the HTTP connection
-
setHttpTimeOut
public void setHttpTimeOut(int timeOut)
Specifies the time out for HTTP connections.- Parameters:
timeOut
- The new time out for the HTTP connection- Throws:
java.lang.IllegalArgumentException
- if the timeOut is not in the range from 0 ..Integer.MAX_VALUE
.
-
isDebugXMLInput
public boolean isDebugXMLInput()
Determines if the XML from CIMOM's response will be dumped into the default debugging output stream.- Returns:
true
if debuging of XML responses is enabled, otherwisefalse
-
setDebugXMLInput
public void setDebugXMLInput(boolean enableDebugXMLInput)
Specifies if the XML response from the CIMOM will be dumped into the default debugging output stream.- Parameters:
enableDebugXMLInput
- The value to disable/enable debugging the XML responses
-
isDebugXMLOutput
public boolean isDebugXMLOutput()
Determines if the XML from request will be dumped into the default debugging output stream.- Returns:
true
if debugging the XML requests is enabled, otherwisefalse
-
setDebugXMLOutput
public void setDebugXMLOutput(boolean enableDebugXMLOutput)
Specifies if the XML from the request will be dumped into the default debugging output stream.- Parameters:
enableDebugXMLOutput
- The value to disable/enable debugging the XML requests.
-
isDebugInputStream
public boolean isDebugInputStream()
Determines if the response from the CIMOM's (before parsing the XML) will be dumped into the default debugging output stream.- Returns:
true
if debugging the XML responses is enabled, otherwisefalse
-
setDebugInputStream
public void setDebugInputStream(boolean enableDebugInputStream)
Specifies if the input stream must be dumped into the default debugging output stream.- Parameters:
enableDebugInputStream
- The value to disable/enable dumping the the input stream to the debugging output stream.
-
getConnectionPoolSize
public int getConnectionPoolSize()
Gets the connection pool size. A value of -1 means all the connections will be reused when it is possible. Zero or a positive value indicates the maximum number of HTTP connections to be reused by the application.- Returns:
- The current size of possible connections in the connection pool.
-
setConnectionPoolSize
public void setConnectionPoolSize(int poolSize)
Specifies the maximum number of connection pools to be maitained alive, and later will be reused for additional request.- Parameters:
poolSize
- The new size of possible connections.- Throws:
java.lang.IllegalArgumentException
- if the specified poolSize is not in the value range from -1 .. Integer.MAX_VALUE.
-
isDebugHttpConnectionPool
public boolean isDebugHttpConnectionPool()
Deprecated.This method is not used anywhere...Determines if the Http Connection Pool debugging is enabled or not.- Returns:
true
if the debug ouput of the HTTP Connection pool is enabled, otherwisefalse
-
setDebugHttpConnectionPool
public void setDebugHttpConnectionPool(boolean enableDebugHTTPPool)
Deprecated.This method is never used at all...Activates or deactivates the HttpConnectionPool debugging information.- Parameters:
enableDebugHTTPPool
- The value to disable/enable writing debug information of the HTTP Connection Pool.
-
getJSSEProvider
public java.lang.String getJSSEProvider()
Gets the complete class name for the JSSE provider.- Returns:
- The class name for the JSSE provider.
-
setJSSEProvider
public void setJSSEProvider(java.lang.String providerClassName)
Specifies the complete class name for the JSSE provider.- Parameters:
providerClassName
- The new class name for the JSSE provider.
-
getJSSEProtocol
public java.lang.String getJSSEProtocol()
- Returns:
- the JSSE Protocol
-
setJSSEProtocol
public void setJSSEProtocol(java.lang.String pProtocol)
- Parameters:
pProtocol
-
-
getJSSEProtocolHandler
public java.lang.String getJSSEProtocolHandler()
- Returns:
- The class name for JSSE protocol handler.
-
setJSSEProtocolHandler
public void setJSSEProtocolHandler(java.lang.String handlerClassName)
-
getSocketFactory
public javax.net.SocketFactory getSocketFactory()
Gets the custom socket factory for client connections. This property is available at runtime only and cannot be set via the configuration file.- Returns:
- The custom socket factory for client connections.
-
setSocketFactory
public void setSocketFactory(javax.net.SocketFactory factory)
Specifies the custom socket factory for client connections. This property is available at runtime only and cannot be set via the configuration file.- Parameters:
factory
- The custom socket factory. Ifnull
the client will use javax.net.SocketFactory.getDefault() or javax.net.ssl.SslSocketFactory.getDefault() factory respectively. Note that the client doesn't do a consistency check between the protocol and the custom socket factory.
-
getJSSECertificate
public java.lang.String getJSSECertificate()
Gets the Certificate Managers name.- Returns:
- The certificate manager name
-
setJSSECertificate
public void setJSSECertificate(java.lang.String jsseCertificateMgr)
Specifies the JSSE certificate manager used for https connection.- Parameters:
jsseCertificateMgr
- The new JSSE certificate manager
-
getLogger
public java.util.logging.Logger getLogger()
Gets the default logger for this application.- Returns:
- The current used
Logger
-
setLogger
public void setLogger(java.util.logging.Logger newLogger)
Allows applications to specify externalLogger
to be used by all the CIM clients. Supported on the global properties instance only.
- Parameters:
newLogger
- The newLogger
to be used for logging- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
isLoggingEnabled
public boolean isLoggingEnabled()
Determines if logging in general is enabled or not.- Returns:
true
if logging is enabled, otherwisefalse
-
setLoggingEnabled
public void setLoggingEnabled(boolean enableLogging)
Specifies if logging in general is enabled or not. Supported on the global properties instance only.- Parameters:
enableLogging
- The value to disable/enable logging.- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
getLoggerConsoleLevel
public java.util.logging.Level getLoggerConsoleLevel()
Get the current log level of the console log handler.- Returns:
- The current log level of the console log handler
-
setLoggerConsoleLevel
public void setLoggerConsoleLevel(java.util.logging.Level loggerConsoleLevel)
Specifies a new log level for the console log handler. Supported on the global properties instance only.- Parameters:
loggerConsoleLevel
- The new log level for the console log handler- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
getLoggerFileLevel
public java.util.logging.Level getLoggerFileLevel()
Get the current log level of the file log handler.- Returns:
- The current log level of the file log handler
-
setLoggerFileLevel
public void setLoggerFileLevel(java.util.logging.Level loggerFileLevel)
Specifies a new log level for the file log handler Supported on the global properties instance only.- Parameters:
loggerFileLevel
- The new log level for the file log handler.- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
getLoggerNameSpace
public java.lang.String getLoggerNameSpace()
Get the current used namespace for the logger.- Returns:
- The current used namespace for the logger.
-
setLoggerNameSpace
public void setLoggerNameSpace(java.lang.String loggerNameSpace)
Specifies a new namespace for the logger. Supported on the global properties instance only.- Parameters:
loggerNameSpace
- The new namespace used for the logger.- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
getLoggerOutputFile
public java.lang.String getLoggerOutputFile()
Get the file name, log messages are written to.- Returns:
- The file name of the log file.
-
setLoggerOutputFile
public void setLoggerOutputFile(java.lang.String loggerOutputFile)
Specifies a new log file name Supported on the global properties instance only.- Parameters:
loggerOutputFile
-- Throws:
java.lang.IllegalStateException
- When called on a non-global instance- See Also:
isGlobal()
-
isCredentialsDefaultEnabled
public boolean isCredentialsDefaultEnabled()
Determines if the usage of the default credentials is enabled or not.- Returns:
true
if the usage of the default credentials is enabled, otherwisefalse
-
setCredentialsDefaultEnabled
public void setCredentialsDefaultEnabled(boolean credentialsDefaultEnabled)
Specifies if the usage of the default credentials must be used or not.- Parameters:
credentialsDefaultEnabled
- The value to disable/enable the usage of the default credentials.
-
getDefaultCredentials
public java.lang.String getDefaultCredentials()
Get the current credentials used if the usage of default credentials is enabled. The default credentials is aka password.- Returns:
- The current credentials (password).
-
setDefaultCredentials
public void setDefaultCredentials(java.lang.String credentialsPassword)
Specifies new default credentials to use if the usage of default credentials is enabled.- Parameters:
credentialsPassword
- The new credential (password) to use.
-
getDefaultPrincipal
public java.lang.String getDefaultPrincipal()
Get the current principal used if the usage of default credentials is enabled. The default principal is aka userID.- Returns:
- The current principal (userID).
-
setDefaultPrincipal
public void setDefaultPrincipal(java.lang.String credentialsUser)
Specifies new default principal to use if the usage of default credentials is enabled.- Parameters:
credentialsUser
- The new principal (userID) to use.
-
getRetriesNumber
public int getRetriesNumber()
Get the number of retries that is set for the transmission of the cimXML request.- Returns:
- The current number of retries.
-
setRetriesNumber
public void setRetriesNumber(int retries)
Specifies the new number of retries that is set for the transmission of the cimXML request.- Parameters:
retries
- The new number of retries.
-
isContentLengthRetryEnabled
public boolean isContentLengthRetryEnabled()
Returns a boolean that indicates whether or not the content lenght retry mechanism is enabled.- Returns:
true
if content length check is enabled, otherwisefalse
-
setContentLengthRetry
public void setContentLengthRetry(boolean enableContentCheck)
Enables or disables the content length retry mechanism.- Parameters:
enableContentCheck
- The value to disable/enable the content length retry mechanism.
-
getContentLength
public int getContentLength()
Returns an integer that contains the content length that is being used for the retry mechanism.- Returns:
- The content length.
-
setContentLength
public void setContentLength(int contentLength)
Determines the content length that is supposed to be used during the retry mechanism.- Parameters:
contentLength
- The content length.
-
getHttpAuthenticationModule
public java.lang.String getHttpAuthenticationModule()
Gets the HTTP authentication module- Returns:
- the HTTP authentication module
-
setHttpAuthenticationModule
public void setHttpAuthenticationModule(java.lang.String pAuthenticationModule)
Sets the HTTP authentication module- Parameters:
pAuthenticationModule
- The authentication module- See Also:
WWW_AUTHENTICATION
,PEGASUS_LOCAL_AUTHENTICATION
-
getSynchronizedSslHandshake
public boolean getSynchronizedSslHandshake()
Returns a boolean that indicates whether or not SSL handshakes should be synchronized.- Returns:
true
if SSL handshakes should be synchronized, otherwisefalse
-
setSynchronizedSslHandshake
public void setSynchronizedSslHandshake(boolean enableSynchronizedSslHandshake)
Enables or disables the synchronization of SSL handshakes- Parameters:
enableSynchronizedSslHandshake
- The value to disable/enable the SSL handshake synchronization mechanism.
-
loadProperties
public boolean loadProperties(java.util.Properties properties)
Loads the properties from the specified properties.- Parameters:
properties
- An instance of properties.- Returns:
true
if the property file could be loaded successfully, otherwisefalse
is returned.
-
loadProperties
public boolean loadProperties()
Loads the properties from the default property file. The default property file name is "cim.defaults". If this file does not exist, the method tries to load from "cimclient.properties". If this file also does not exist, the default values will be used.- Returns:
true
if the property file could be loaded successfully, otherwisefalse
is returned.
-
loadProperties
public boolean loadProperties(java.lang.String pPropertyFile)
Loads the properties from the specified file.- Parameters:
pPropertyFile
- a String representing the file location.- Returns:
true
if the property file could be loaded successfully, otherwisefalse
is returned.
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.util.Properties
-
isGlobal
public boolean isGlobal()
Determines if these session properties are the global properties.- Returns:
true
if these session properties are the global ones
-
getPropertyFile
public java.lang.String getPropertyFile()
Gets the properties file that was applied (by loadProperties() or loadProperties(String) this SessionProperties instance. If multiple files have been applied this method returns the last one. If no properties file has been applied the method returnsnull
.- Returns:
- The properties file
-
-