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 Details

    • HttpConfiguration

      public HttpConfiguration()
      Create a default configuration
    • HttpConfiguration

      public HttpConfiguration(StructureValue configuration)
      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

      @Export(qualifiers="Description(\"Host Name\")") public String getHostName()
      Get the Host name for the server
      Returns:
      - host name for the server
    • getRepository

      @Export(qualifiers="Description(\"Repository Name\")") public String getRepository()
      Get the name of the repository to use
      Returns:
      - name of the repository. Null if none defined
    • getServerPort

      @Export(qualifiers="Description(\"Server Port\")") public int 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

      @Export(qualifiers="Description(\"Name of key store to use, if any\")") public String 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

      @Export(qualifiers="Description(\"Proxy Name\")") public String getProxyHost()
      Get the Host name for a proxy, if any defined
      Returns:
      - proxy name for the client
    • getProxyPort

      @Export(qualifiers="Description(\"Proxy Port\")") public int 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

      @Export(qualifiers="Description(\"Name of the log file, if any\")") public String getLogFile()
      Get the log file used in the server
      Returns:
      - name of the log file
    • getLogEnabled

      @Export(qualifiers="Description(\"true if logging is enabled\")") public Boolean getLogEnabled()
      flag to indicate if logging is enabled in the server
      Returns:
      - true if logging is enabled, false otherwise
    • getLogLevel

      @Export(qualifiers="Description(\"level for logging\")") public String getLogLevel()
    • getConfiguration

      public static HttpConfiguration getConfiguration(String id, String nameSpace, String directory)
      Get a configuration corresponding to given id (must not be null)
      Parameters:
      id - - identity for the configuration. Default is used if null
      nameSpace - - nameSpace for the configuration. Default is used if null
      directory - - configuration directory. Default is used if null
      Returns:
      - Server configuration. Null if no such configuration exists
    • main

      public static void main(String[] args)
      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]