public class StarterConfiguration extends java.lang.Object implements IStarterConfiguration
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
cmdargs
Command line arguments.
|
protected java.util.List<java.lang.String> |
components
Components to start.
|
protected ConfigurationInfo |
configurationInfo
Name of the configured configuration
|
static long |
DEFAULT_LOCAL_TIMEOUT
Constant for local default timeout.
|
static long |
DEFAULT_REMOTE_TIMEOUT
Constant for remote default timeout.
|
protected java.lang.Long |
defaultTimeout
Default platform timeout.
|
protected IModelInfo |
model
Platform model.
|
static java.util.Set<java.lang.String> |
RESERVED
The reserved platform parameters.
|
AUTOSHUTDOWN, COMPONENT, COMPONENT_FACTORY, CONFIGURATION_FILE, CONFIGURATION_NAME, DATA_ADDRESSBOOK, DATA_DEFAULT_LOCAL_TIMEOUT, DATA_DEFAULT_REMOTE_TIMEOUT, DATA_PARAMETERCOPY, DATA_REALTIMETIMEOUT, DATA_SERVICEREGISTRY, DEBUGFUTURES, DEBUGSERVICES, DEBUGSTEPS, DEFTIMEOUT, FALLBACK_COMPONENT_FACTORY, FALLBACK_PLATFORM_CONFIGURATION, MONITORING, NOSTACKCOMPACTION, OPENGL, PERSIST, PLATFORM_COMPONENT, PLATFORM_NAME, REGISTRY_SYNC
Constructor and Description |
---|
StarterConfiguration()
Creates an empty configuration.
|
StarterConfiguration(StarterConfiguration source)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(java.lang.Class clazz)
Add a component that is started after platform startup.
|
void |
addComponent(java.lang.String path)
Add a component that is started after platform startup.
|
protected void |
checkConsistency()
Checks this configuration for consistency errors.
|
void |
enhanceWith(StarterConfiguration other)
Enhance this config with given other config.
|
boolean |
getAutoShutdown()
Get autoshutdown flag.
|
boolean |
getBooleanValue(java.lang.String key)
Get the boolean value of a flag.
|
java.lang.String |
getComponentFactory()
Get the component factory.
|
java.util.List<java.lang.String> |
getComponents()
Get the list of components to be started at startup.
|
java.lang.String |
getConfigurationFile()
Get the main configuration file, e.g.
|
java.lang.String |
getConfigurationName()
Get the configuration name.
|
boolean |
getDebugFutures()
Get the debug futures flag.
|
boolean |
getDebugServices()
Get the debug services flag.
|
boolean |
getDebugSteps()
Get the debug steps flag.
|
java.lang.Long |
getDefaultTimeout()
Gets the default timeout.
|
long |
getLocalDefaultTimeout()
Get the default timeout for local calls.
|
IMonitoringService.PublishEventLevel |
getMonitoring()
Get the monitoring level.
|
boolean |
getNoStackCompaction()
Get the no stack compaction flag.
|
boolean |
getOpenGl()
Get the OPENGL flag.
|
boolean |
getPersist()
Get the persist flag.
|
java.lang.Class |
getPlatformComponent()
Get platform component.
|
java.lang.String |
getPlatformName()
Get the platform name.
|
long |
getRemoteDefaultTimeout()
Get the default timeout for remote calls.
|
java.lang.Object |
getValue(java.lang.String key)
Generic getter for configuration parameters.
|
void |
parseArg(java.lang.String key,
java.lang.String stringValue,
java.lang.Object value)
Parse an argument.
|
void |
setAutoShutdown(boolean value)
Set autoshutdown flag.
|
void |
setComponents(java.util.List<java.lang.String> newcomps)
Set the list of components to be started at startup.
|
void |
setConfigurationFile(java.lang.String value)
Set the main configuration file, e.g.
|
void |
setConfigurationName(java.lang.String value)
Set the configuration name.
|
void |
setDebugFutures(boolean value)
Set the debug futures flag.
|
void |
setDebugServices(boolean value)
Set the debug services flag.
|
void |
setDebugSteps(boolean value)
Set the debug steps flag.
|
void |
setDefaultTimeout(long to)
Set the default timeout.
|
void |
setMonitoring(IMonitoringService.PublishEventLevel level)
Set the monitoring level.
|
void |
setNoStackCompaction(boolean value)
Set the no stack compaction flag.
|
void |
setOpenGl(boolean value)
Set the OPENGL flag.
|
void |
setPersist(boolean value)
Set the persist flag.
|
void |
setPlatformComponent(java.lang.Class value)
Set platform component.
|
void |
setPlatformModel(IModelInfo model)
Sets the platform model to extract configuration values from it.
|
void |
setPlatformName(java.lang.String value)
Set the platform name.
|
void |
setValue(java.lang.String key,
java.lang.Object value)
Generic setter for cmd args.
|
public static long DEFAULT_REMOTE_TIMEOUT
public static long DEFAULT_LOCAL_TIMEOUT
public static final java.util.Set<java.lang.String> RESERVED
protected java.util.Map<java.lang.String,java.lang.Object> cmdargs
protected java.util.List<java.lang.String> components
protected java.lang.Long defaultTimeout
protected IModelInfo model
protected ConfigurationInfo configurationInfo
public StarterConfiguration()
public StarterConfiguration(StarterConfiguration source)
public void setPlatformModel(IModelInfo model)
setPlatformModel
in interface IStarterConfiguration
model
- public void setValue(java.lang.String key, java.lang.Object value)
key
- value
- public java.lang.Object getValue(java.lang.String key)
key
- public java.lang.String getPlatformName()
getPlatformName
in interface IStarterConfiguration
public void setPlatformName(java.lang.String value)
setPlatformName
in interface IStarterConfiguration
public java.lang.String getConfigurationName()
getConfigurationName
in interface IStarterConfiguration
public void setConfigurationName(java.lang.String value)
setConfigurationName
in interface IStarterConfiguration
public boolean getAutoShutdown()
getAutoShutdown
in interface IStarterConfiguration
public void setAutoShutdown(boolean value)
setAutoShutdown
in interface IStarterConfiguration
public java.lang.Class getPlatformComponent()
getPlatformComponent
in interface IStarterConfiguration
public void setPlatformComponent(java.lang.Class value)
setPlatformComponent
in interface IStarterConfiguration
public void setDefaultTimeout(long to)
setDefaultTimeout
in interface IStarterConfiguration
to
- timeout in ms.public java.lang.Long getDefaultTimeout()
getDefaultTimeout
in interface IStarterConfiguration
public long getLocalDefaultTimeout()
getLocalDefaultTimeout
in interface IStarterConfiguration
public long getRemoteDefaultTimeout()
getRemoteDefaultTimeout
in interface IStarterConfiguration
public void addComponent(java.lang.Class clazz)
addComponent
in interface IStarterConfiguration
clazz
- Class of the component.public void addComponent(java.lang.String path)
addComponent
in interface IStarterConfiguration
path
- Path to the component.public void setComponents(java.util.List<java.lang.String> newcomps)
setComponents
in interface IStarterConfiguration
newcomps
- List of components.public java.util.List<java.lang.String> getComponents()
getComponents
in interface IStarterConfiguration
public java.lang.String getComponentFactory()
getComponentFactory
in interface IStarterConfiguration
public void setConfigurationFile(java.lang.String value)
setConfigurationFile
in interface IStarterConfiguration
value
- Path to configuration filepublic java.lang.String getConfigurationFile()
getConfigurationFile
in interface IStarterConfiguration
public void setMonitoring(IMonitoringService.PublishEventLevel level)
setMonitoring
in interface IStarterConfiguration
level
- public IMonitoringService.PublishEventLevel getMonitoring()
getMonitoring
in interface IStarterConfiguration
public void setPersist(boolean value)
setPersist
in interface IStarterConfiguration
value
- public boolean getPersist()
getPersist
in interface IStarterConfiguration
public void setDebugFutures(boolean value)
setDebugFutures
in interface IStarterConfiguration
value
- public boolean getDebugFutures()
getDebugFutures
in interface IStarterConfiguration
public void setDebugServices(boolean value)
setDebugServices
in interface IStarterConfiguration
value
- public boolean getDebugServices()
getDebugServices
in interface IStarterConfiguration
public void setDebugSteps(boolean value)
setDebugSteps
in interface IStarterConfiguration
value
- public boolean getDebugSteps()
getDebugSteps
in interface IStarterConfiguration
public void setNoStackCompaction(boolean value)
setNoStackCompaction
in interface IStarterConfiguration
value
- public boolean getNoStackCompaction()
getNoStackCompaction
in interface IStarterConfiguration
public boolean getBooleanValue(java.lang.String key)
getBooleanValue
in interface IStarterConfiguration
public void setOpenGl(boolean value)
setOpenGl
in interface IStarterConfiguration
value
- public boolean getOpenGl()
getOpenGl
in interface IStarterConfiguration
public void enhanceWith(StarterConfiguration other)
other
- public void parseArg(java.lang.String key, java.lang.String stringValue, java.lang.Object value)
key
- The key.stringValue
- The value.protected void checkConsistency()