Package jadex.base
Class PlatformConfigurationHandler
- java.lang.Object
- 
- jadex.base.PlatformConfigurationHandler
 
- 
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
 
 public class PlatformConfigurationHandler extends java.lang.Object implements java.lang.reflect.InvocationHandlerPlatform configuration handler is a proxy handler that implements the logic for the configuration interfaces.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Object>defvaluesThe default values.static java.util.Map<java.lang.String,java.lang.String>namemappingsUsed for mapping method names to property names (if they differ).protected booleanreadonlyReadonly flag.protected java.util.Map<java.lang.String,java.lang.Object>valuesThe map of values.
 - 
Constructor SummaryConstructors Constructor Description PlatformConfigurationHandler()Create a new handler.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IPlatformConfigurationaddInternetComm(IPlatformConfiguration config)Add global (internet) communication settings to configuration.static IPlatformConfigurationaddIntranetComm(IPlatformConfiguration config)Add local (intranet) communication settings to configuration.protected voidcheckReadOnly()Check the readonly state.static IPlatformConfigurationgetAndroidDefault()Returns a PlatformConfiguration with the default parameters.static java.lang.ObjectgetArgumentValueFromModel(java.lang.String name, IModelInfo model)static ConfigurationInfogetConfigurationInfo(java.lang.String configname, IModelInfo model)Get the configuration name.java.lang.StringgetConfigurationName()static IPlatformConfigurationgetDefault()Returns a PlatformConfiguration with the default parameters.static IPlatformConfigurationgetDefaultNoGui()Returns a PlatformConfiguration with the default parameters but without gui.protected java.lang.StringgetKeyForMethodname(java.lang.String mname, int prefixlen)Get the key for a method name.static IPlatformConfigurationgetMinimal()Returns a minimal platform configuration without any network connectivity.static IPlatformConfigurationgetMinimalComm()Returns a minimal platform configuration that allows service discovery and platform communication in local (intranet via multicast/tcp) and global (internet via superpeer/relay over websockets) networks.protected IModelInfogetModel()static IPlatformConfigurationgetPlatformConfiguration()Get the default platform configuration.static IPlatformConfigurationgetPlatformConfiguration(java.lang.ClassLoader cl)Get the default platform configuration.static IPlatformConfigurationgetPlatformConfiguration(java.lang.ClassLoader cl, PlatformConfigurationHandler h)Get the default platform configuration.protected java.lang.ObjectgetValue(java.lang.String key, IModelInfo model)Generic getter for configuration parameters.java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)Called on method invocation.voidparseArg(IPlatformConfiguration config, java.lang.String key, java.lang.String strval, java.lang.Object value)Parse an argument.
 
- 
- 
- 
Field Detail- 
readonlyprotected boolean readonly Readonly flag.
 - 
valuesprotected java.util.Map<java.lang.String,java.lang.Object> values The map of values.
 - 
namemappingspublic static java.util.Map<java.lang.String,java.lang.String> namemappings Used for mapping method names to property names (if they differ).
 - 
defvaluespublic static java.util.Map<java.lang.String,java.lang.Object> defvalues The default values.
 
- 
 - 
Method Detail- 
invokepublic java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.ThrowableCalled on method invocation.- Specified by:
- invokein interface- java.lang.reflect.InvocationHandler
- Parameters:
- proxy- The proxy.
- method- The method.
- args- The arguments.
- Throws:
- java.lang.Throwable
 
 - 
checkReadOnlyprotected void checkReadOnly() Check the readonly state.
 - 
getKeyForMethodnameprotected java.lang.String getKeyForMethodname(java.lang.String mname, int prefixlen)Get the key for a method name.- Parameters:
- mname- The method name.
- prefixlen- The prefix length.
- Returns:
- The key.
 
 - 
parseArgpublic void parseArg(IPlatformConfiguration config, java.lang.String key, java.lang.String strval, java.lang.Object value) Parse an argument.- Parameters:
- key- The key.
- strval- The value.
 
 - 
getValueprotected java.lang.Object getValue(java.lang.String key, IModelInfo model)Generic getter for configuration parameters. Retrieves values in 3 stages: 1. From given command line arguments. 2. From given model configuration ("auto", "fixed", ...) 3. From model default values. For retrieval from model, setPlatformModel has to be called before.- Parameters:
- key-
- Returns:
 
 - 
getModelprotected IModelInfo getModel() 
 - 
getConfigurationInfopublic static ConfigurationInfo getConfigurationInfo(java.lang.String configname, IModelInfo model) Get the configuration name.
 - 
getConfigurationNamepublic java.lang.String getConfigurationName() 
 - 
getArgumentValueFromModelpublic static java.lang.Object getArgumentValueFromModel(java.lang.String name, IModelInfo model)- Parameters:
- name-
- Returns:
 
 - 
getPlatformConfigurationpublic static IPlatformConfiguration getPlatformConfiguration() Get the default platform configuration.- Returns:
- The default configuration.
 
 - 
getPlatformConfigurationpublic static IPlatformConfiguration getPlatformConfiguration(java.lang.ClassLoader cl) Get the default platform configuration.- Parameters:
- cl- The classloader.
- Returns:
- The default configuration.
 
 - 
getPlatformConfigurationpublic static IPlatformConfiguration getPlatformConfiguration(java.lang.ClassLoader cl, PlatformConfigurationHandler h) Get the default platform configuration.- Parameters:
- cl- The classloader.
- Returns:
- The default configuration.
 
 - 
getDefaultpublic static IPlatformConfiguration getDefault() Returns a PlatformConfiguration with the default parameters.
 - 
getDefaultNoGuipublic static IPlatformConfiguration getDefaultNoGui() Returns a PlatformConfiguration with the default parameters but without gui.
 - 
getAndroidDefaultpublic static IPlatformConfiguration getAndroidDefault() Returns a PlatformConfiguration with the default parameters.
 - 
getMinimalpublic static IPlatformConfiguration getMinimal() Returns a minimal platform configuration without any network connectivity.
 - 
getMinimalCommpublic static IPlatformConfiguration getMinimalComm() Returns a minimal platform configuration that allows service discovery and platform communication in local (intranet via multicast/tcp) and global (internet via superpeer/relay over websockets) networks.
 - 
addInternetCommpublic static IPlatformConfiguration addInternetComm(IPlatformConfiguration config) Add global (internet) communication settings to configuration.- Returns:
- Supplied configuration for builder pattern.
 
 - 
addIntranetCommpublic static IPlatformConfiguration addIntranetComm(IPlatformConfiguration config) Add local (intranet) communication settings to configuration.- Returns:
- Supplied configuration for builder pattern.
 
 
- 
 
-