Class SystemConfig

java.lang.Object
com.gigaspaces.start.SystemConfig

public class SystemConfig extends Object
Provides system configuration support.
  • Field Details

    • CODESERVER

      public static final String CODESERVER
      System property set indicating the address and port of the Webster instance created by this utility, in the form of :
      http://address:port
      See Also:
  • Method Details

    • getInstance

      public static SystemConfig getInstance(String[] configArgs) throws ConfigurationException
      Get an instance of the SystemConfig object
      Parameters:
      configArgs - An array whose first element is the location of the configuration source and remaining elements specify override values for entries that will be used to create the SystemConfig singleton for the system.

      If the SystemConfig instance has already been created this parameter is optional

      Returns:
      The SystemConfig instance
      Throws:
      ConfigurationException
    • getInstance

      public static SystemConfig getInstance()
      Get an instance of the SystemConfig object that has been previously created with configuration arguments. This is a utilty method for clients to obtain the previously created SystemConfig instance
      Returns:
      The SystemConfig instance. If the SystemConfig instance has not been previously created usng a configurationwhen this method is called, a RuntimeException is thrown
    • getConfigurationParms

      public String[] getConfigurationParms()
      Get the configuration parameters used to create this utility. If this utility was created with no (or null) parameters, a zero-length String array will be returned
    • getConfiguration

      public Configuration getConfiguration()
      Get the Configuration created by this utility
    • appendOverrides

      public static String[] appendOverrides(String configFile)
      If this utility has been started with override arguments, append the override arguments to the configuration file
      Parameters:
      configFile - The file to append to, this parameter must not be null
      Returns:
      A String array, with the first element being the configFile parameter, each subsequent element a corresponding override argument this utility was started with. If there are no override arguments, the array will contain only the configFile parameter.
    • getOverrides

      public String[] getOverrides()
      Get the configuration overrides this utility was created with
      Returns:
      The configuration overrides this utility was created with. If no configuration overrides were provided, this method returns null
    • getPlatformJars

      public URL[] getPlatformJars() throws MalformedURLException, ConfigurationException
      Get the platformJars
      Returns:
      URL[] An array of URL resources indicating the jars the common ClassLoader must add.
      Throws:
      MalformedURLException - If the URL resources result in an improperly formatted URL
      ConfigurationException - If there are errors accessing the configuration
    • getSystemProperties

      public Properties getSystemProperties() throws ConfigurationException, UnknownHostException
      Get configured system properties
      Throws:
      ConfigurationException
      UnknownHostException
    • getWebsterProtocol

      public String getWebsterProtocol()
    • getWebsterPort

      public int getWebsterPort()
    • getWebster

      Create a Webster instance
      Returns:
      A Webster instance
      Throws:
      BindException - If the Webster instance could not be created
      ConfigurationException - If errors occur reading the configuration
      UnknownHostException
    • getServiceDescriptor

      Throws:
      BindException
      ConfigurationException
      UnknownHostException
    • getCustomService

      public Closeable getCustomService(String key)
    • getJMXServiceDescriptor

      public ServiceDescriptor getJMXServiceDescriptor() throws ConfigurationException
      Get the ServiceDescriptor to start JMX
      Throws:
      ConfigurationException - If errors occur reading the configuration or the default configuration file cannot be located