Package com.gigaspaces.start
Class SystemConfig
java.lang.Object
com.gigaspaces.start.SystemConfig
Provides system configuration support.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInitialize RMI Registry and JMX Platform MBeanServer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property set indicating the address and port of the Webster instance created by this utility, in the form of : -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]appendOverrides(String configFile) If this utility has been started with override arguments, append the override arguments to the configuration fileGet theConfigurationcreated by this utilityString[]Get the configuration parameters used to create this utility.getCustomService(String key) static SystemConfigGet an instance of the SystemConfig object that has been previously created with configuration arguments.static SystemConfiggetInstance(String[] configArgs) Get an instance of the SystemConfig objectGet the ServiceDescriptor to start JMXString[]Get the configuration overrides this utility was created withURL[]Get the platformJarsGet configured system propertiesCreate a Webster instanceint
-
Field Details
-
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
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
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
Get the configuration parameters used to create this utility. If this utility was created with no (ornull) parameters, a zero-length String array will be returned -
getConfiguration
Get theConfigurationcreated by this utility -
appendOverrides
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 benull- Returns:
- A String array, with the first element being the
configFileparameter, each subsequent element a corresponding override argument this utility was started with. If there are no override arguments, the array will contain only theconfigFileparameter.
-
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
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 URLConfigurationException- If there are errors accessing the configuration
-
getSystemProperties
Get configured system properties -
getWebsterProtocol
-
getWebsterPort
public int getWebsterPort() -
getWebster
Create a Webster instance- Returns:
- A Webster instance
- Throws:
BindException- If the Webster instance could not be createdConfigurationException- If errors occur reading the configurationUnknownHostException
-
getServiceDescriptor
public ServiceDescriptor getServiceDescriptor(String key) throws BindException, ConfigurationException, UnknownHostException -
getCustomService
-
getJMXServiceDescriptor
Get the ServiceDescriptor to start JMX- Throws:
ConfigurationException- If errors occur reading the configuration or the default configuration file cannot be located
-