public class PlatformConfigurationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
defvalues
The default values.
|
static java.util.Map<java.lang.String,java.lang.String> |
namemappings
Used for mapping method names to property names (if they differ).
|
protected boolean |
readonly
Readonly flag.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
values
The map of values.
|
Constructor and Description |
---|
PlatformConfigurationHandler()
Create a new handler.
|
Modifier and Type | Method and Description |
---|---|
static IPlatformConfiguration |
addInternetComm(IPlatformConfiguration config)
Add global (internet) communication settings to configuration.
|
static IPlatformConfiguration |
addIntranetComm(IPlatformConfiguration config)
Add local (intranet) communication settings to configuration.
|
protected void |
checkReadOnly()
Check the readonly state.
|
static IPlatformConfiguration |
getAndroidDefault()
Returns a PlatformConfiguration with the default parameters.
|
static java.lang.Object |
getArgumentValueFromModel(java.lang.String name,
IModelInfo model) |
static ConfigurationInfo |
getConfigurationInfo(java.lang.String configname,
IModelInfo model)
Get the configuration name.
|
java.lang.String |
getConfigurationName() |
static IPlatformConfiguration |
getDefault()
Returns a PlatformConfiguration with the default parameters.
|
static IPlatformConfiguration |
getDefaultNoGui()
Returns a PlatformConfiguration with the default parameters but without gui.
|
protected java.lang.String |
getKeyForMethodname(java.lang.String mname,
int prefixlen)
Get the key for a method name.
|
static IPlatformConfiguration |
getMinimal()
Returns a minimal platform configuration without any network
connectivity.
|
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.
|
protected IModelInfo |
getModel() |
static IPlatformConfiguration |
getPlatformConfiguration()
Get the default platform configuration.
|
static IPlatformConfiguration |
getPlatformConfiguration(java.lang.ClassLoader cl)
Get the default platform configuration.
|
static IPlatformConfiguration |
getPlatformConfiguration(java.lang.ClassLoader cl,
PlatformConfigurationHandler h)
Get the default platform configuration.
|
protected java.lang.Object |
getValue(java.lang.String key,
IModelInfo model)
Generic getter for configuration parameters.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Called on method invocation.
|
void |
parseArg(IPlatformConfiguration config,
java.lang.String key,
java.lang.String strval,
java.lang.Object value)
Parse an argument.
|
protected boolean readonly
protected java.util.Map<java.lang.String,java.lang.Object> values
public static java.util.Map<java.lang.String,java.lang.String> namemappings
public static java.util.Map<java.lang.String,java.lang.Object> defvalues
public PlatformConfigurationHandler()
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
proxy
- The proxy.method
- The method.args
- The arguments.java.lang.Throwable
protected void checkReadOnly()
protected java.lang.String getKeyForMethodname(java.lang.String mname, int prefixlen)
mname
- The method name.prefixlen
- The prefix length.public void parseArg(IPlatformConfiguration config, java.lang.String key, java.lang.String strval, java.lang.Object value)
key
- The key.strval
- The value.protected java.lang.Object getValue(java.lang.String key, IModelInfo model)
key
- protected IModelInfo getModel()
public static ConfigurationInfo getConfigurationInfo(java.lang.String configname, IModelInfo model)
public java.lang.String getConfigurationName()
public static java.lang.Object getArgumentValueFromModel(java.lang.String name, IModelInfo model)
name
- public static IPlatformConfiguration getPlatformConfiguration()
public static IPlatformConfiguration getPlatformConfiguration(java.lang.ClassLoader cl)
cl
- The classloader.public static IPlatformConfiguration getPlatformConfiguration(java.lang.ClassLoader cl, PlatformConfigurationHandler h)
cl
- The classloader.public static IPlatformConfiguration getDefault()
public static IPlatformConfiguration getDefaultNoGui()
public static IPlatformConfiguration getAndroidDefault()
public static IPlatformConfiguration getMinimal()
public static IPlatformConfiguration getMinimalComm()
public static IPlatformConfiguration addInternetComm(IPlatformConfiguration config)
public static IPlatformConfiguration addIntranetComm(IPlatformConfiguration config)