Package net.aifusion.cimserver
Class HttpConfiguration
java.lang.Object
net.aifusion.cimserver.HttpConfiguration
@Export(qualifiers="Description(\"Http Configuration\"),Version(\"2.1.1\")")
public class HttpConfiguration
extends Object
Class to represent a Cim server configuration
- Author:
- Sharad Singhal
-
Constructor Summary
ConstructorDescriptionCreate a default configurationHttpConfiguration
(StructureValue configuration) Create a CIMServer configuration -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpConfiguration
getConfiguration
(String id, String nameSpace, String directory) Get a configuration corresponding to given id (must not be null)Get the name of the cookie store to use for managing cookies, if anyGet the Host name for the servergetId()
Get the configuration ID (unique identifier for the configuration)Get the name of the key store to use for managing known keys, if anyGet the password used to protect the key store, if anyflag to indicate if logging is enabled in the serverGet the log file used in the serverint
Get maximum sessions accepted by server.Get the CIM provider used in CimHandlerGet the Host name for a proxy, if any definedint
Get the server portGet the name of the repository to useGet the name of the request handler class used by this serverint
Get the server portint
Get the server time outGet the name of the trusted certificate store to use, if anyGet the password used to protect the trust store, if anyGet the X500 Principal distinguished name for server credentialsboolean
isSecure()
Check if the server uses httpsstatic void
Create an Http configuration.
-
Constructor Details
-
HttpConfiguration
public HttpConfiguration()Create a default configuration -
HttpConfiguration
Create a CIMServer configuration- Parameters:
configuration
- - configuration to use. If null, a default configuration is used- See Also:
-
-
Method Details
-
getId
@Export(qualifiers="Description(\"Configuration ID\"),Key", defaultValue="\"defaultConfig\"") public String getId()Get the configuration ID (unique identifier for the configuration)- Returns:
- - configuration ID
-
getHostName
Get the Host name for the server- Returns:
- - host name for the server
-
getRepository
Get the name of the repository to use- Returns:
- - name of the repository. Null if none defined
-
getServerPort
Get the server port- Returns:
- - server port for the server
-
getServerTimeout
@Export(qualifiers="Description(\"Server Time Out (ms). If 0, no timeout enforced\")") public int getServerTimeout()Get the server time out- Returns:
- - time out in ms
-
getMaxSessions
@Export(qualifiers="Description(\"Maximum concurrent sessions accepted by server. if 0, no maximum enforced\")") public int getMaxSessions()Get maximum sessions accepted by server. 0 for no maximums- Returns:
- - maximum sessions accepted
-
isSecure
@Export(qualifiers="Description(\"Flag to indicate if server is secure (i.e., uses https)\")") public boolean isSecure()Check if the server uses https- Returns:
- - true if the server should use https, false otherwise
-
getCookieStore
@Export(qualifiers="Description(\"Name of Cookie Store to use, if any\")") public String getCookieStore()Get the name of the cookie store to use for managing cookies, if any- Returns:
- - name of the cookie store to use
-
getKeyStore
Get the name of the key store to use for managing known keys, if any- Returns:
- - name of the key store to use
-
getKeyStorePassword
@Export(qualifiers="Description(\"password for the key store to use, if any\")") public String getKeyStorePassword()Get the password used to protect the key store, if any- Returns:
- - password for the key store. Null if none defined
-
getTrustStore
@Export(qualifiers="Description(\"Name of trust store to use, if any\")") public String getTrustStore()Get the name of the trusted certificate store to use, if any- Returns:
- - name of the trusted certificate store to use
-
getTrustStorePassword
@Export(qualifiers="Description(\"password for the trust store to use, if any\")") public String getTrustStorePassword()Get the password used to protect the trust store, if any- Returns:
- - password for the trust store. Null if none defined
-
getX500Principal
@Export(qualifiers="Description(\"X500 principal distinguished name used for server credentials\")") public String getX500Principal()Get the X500 Principal distinguished name for server credentials- Returns:
- - X500 name used by the server
-
getRequestHandler
@Export(qualifiers="Description(\"Name of the request handler class to use\")") public String getRequestHandler()Get the name of the request handler class used by this server- Returns:
- - name of the request handler class to use
-
getProxyHost
Get the Host name for a proxy, if any defined- Returns:
- - proxy name for the client
-
getProxyPort
Get the server port- Returns:
- - server port for the server
-
getProvider
@Export(qualifiers="Description(\"Name of the provider to use in the handler class\")") public String getProvider()Get the CIM provider used in CimHandler- Returns:
- - name of the class to use in CimHandler
-
getLogFile
Get the log file used in the server- Returns:
- - name of the log file
-
getLogEnabled
flag to indicate if logging is enabled in the server- Returns:
- - true if logging is enabled, false otherwise
-
getLogLevel
-
getConfiguration
Get a configuration corresponding to given id (must not be null)- Parameters:
id
- - identity for the configuration. Default is used if nullnameSpace
- - nameSpace for the configuration. Default is used if nulldirectory
- - configuration directory. Default is used if null- Returns:
- - Server configuration. Null if no such configuration exists
-
main
Create an Http configuration.- Parameters:
args
- - Arguments are- -help | -Help
- show help (must be only argument)
- -repository repositoryName
- Name of the repository to use [repository]
- -n namespacePath
- NameSpacePath to use [aifusion]
- -id configurationId
- ConfigurationID to use [defaultID]
- -cp configPath
- Configuration directory [resources/config]
- -hostname host name
- server host name [localhost]
- -serverport port
- server port number [8085]
- -servertimeout timeout
- server time out in ms. 0 implies no limit [5000]
- -maxsessions sessions
- maximum sessions. 0 implies no limit [0]
- -secure [true|false]
- server uses https [false]
- -cookiestore cookieStore
- cookieStore to use [resources/cookies]
- -keystore keystore
- keystore to use [keystore.jks]
- -truststore truststore
- truststore to use [truststore.jks]
- -keystorepassword pass
- keystore password [null]
- -truststorepassword pass
- truststore password [null]
- -x500principal dn
- x500Principal DN for server [CN=localhost,OU=cimfusion.com,O=cimfusion,C=US,L=Belmont,ST=California]
- -requesthandler className
- default request handler [CimHandler]
- -proxyHost hostName
- proxy host [null]
- -proxyPort port
- proxy port [8080]
-