public class Starter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_BOOTSTRAPFACTORY
The bootstrap component factory.
|
static java.lang.String |
DATA_CMSSTATE
The CMS state.
|
static java.lang.String |
DATA_DEFAULT_TIMEOUT
Constant for default timeout name.
|
static java.lang.String |
DATA_NETWORKNAMESCACHE
The used to store the current network names.
|
static java.lang.String |
DATA_PARAMETERCOPY
Flag if copying parameters for local service calls is allowed.
|
static java.lang.String |
DATA_PLATFORMACCESS
The bootstrap component factory.
|
static java.lang.String |
DATA_REALTIMETIMEOUT
Flag if local timeouts should be realtime (instead of clock dependent).
|
static java.lang.String |
DATA_SERIALIZATIONSERVICES
The serialization services for serializing and en/decoding objects including remote reference handling.
|
static java.lang.String |
DATA_SERVICEREGISTRY
The local service registry data key.
|
static java.lang.String |
DATA_TRANSPORTCACHE
The transport cache used to .
|
protected static IRwMap<IComponentIdentifier,IRwMap<java.lang.String,java.lang.Object>> |
platformmem
Global platform data.
|
protected static java.util.Map<IComponentIdentifier,Tuple2<BlockingQueue,java.lang.Thread>> |
rescuethreads
The rescue threads - per platform.
|
Constructor and Description |
---|
Starter() |
Modifier and Type | Method and Description |
---|---|
static IFuture<IExternalAccess> |
createPlatform()
Create the platform.
|
static IFuture<IExternalAccess> |
createPlatform(IPlatformConfiguration config)
Create the platform.
|
static IFuture<IExternalAccess> |
createPlatform(IPlatformConfiguration pconfig,
java.util.Map<java.lang.String,java.lang.Object> pargs)
Create the platform.
|
static IFuture<IExternalAccess> |
createPlatform(IPlatformConfiguration pconfig,
java.lang.String[] args)
Create the platform.
|
static IFuture<IExternalAccess> |
createPlatform(java.util.Map<java.lang.String,java.lang.String> args)
Create the platform.
|
static IFuture<IExternalAccess> |
createPlatform(java.lang.String... args)
Create the platform.
|
protected static IComponentIdentifier |
createPlatformIdentifier(java.lang.String pfname)
Internal method to create a component identifier.
|
static IFuture<IExternalAccess> |
createProxy(IExternalAccess local,
IExternalAccess remote)
Create a proxy for the remote platform.
|
static boolean |
getBooleanValueWithArgs(java.util.Map<java.lang.String,java.lang.Object> args,
java.lang.String argname,
boolean def)
Get a boolean value from args (otherwise return default value passed as arg).
|
static long |
getDefaultTimeout(IComponentIdentifier platform)
Get the default timeout.
|
static java.lang.Object |
getPlatformValue(IComponentIdentifier platform,
java.lang.String key)
Get a global platform value.
|
static long |
getScaledDefaultTimeout(IComponentIdentifier platform,
double scale)
Get the scaled default timeout.
|
static boolean |
hasPlatformValue(IComponentIdentifier platform,
java.lang.String key)
Get a global platform value.
|
static void |
initRescueThread(IComponentIdentifier cid,
IPlatformConfiguration rootconfig)
Init the rescue thread for a platform..
|
static boolean |
isParameterCopy(IComponentIdentifier platform)
Check if the parameter copy flag is set for a platform.
|
static boolean |
isRealtimeTimeout(IComponentIdentifier platform)
Check if the real time timeout flag is set for a platform.
|
static boolean |
isRescueThread(IComponentIdentifier cid)
Test if the current thread is the rescue thread of the platform.
|
static void |
main(java.lang.String[] args)
Main for starting the platform (with meaningful fallbacks)
|
static void |
parseArg(java.lang.String okey,
java.lang.String val,
java.util.Map<java.lang.String,java.lang.Object> vals) |
static java.util.Map<java.lang.String,java.lang.Object> |
parseArgs(java.lang.String args)
Create a platform configuration.
|
static java.util.Map<java.lang.String,java.lang.Object> |
parseArgs(java.lang.String[] args) |
static void |
putPlatformValue(IComponentIdentifier platform,
java.lang.String key,
java.lang.Object value)
Get a global platform value.
|
static void |
removePlatformMemory(IComponentIdentifier platform)
Get a global platform value.
|
static void |
scheduleRescueStep(IComponentIdentifier cid,
java.lang.Runnable run)
Schedule a rescue step.
|
static void |
setDefaultTimeout(IComponentIdentifier platform,
long timeout)
Set the default timeout.
|
static void |
shutdownRescueThread(IComponentIdentifier cid)
Shutdown the rescue thread of a platform.
|
protected static IFuture<java.lang.Void> |
startComponents(int i,
java.util.List<java.lang.String> components,
IInternalAccess instance)
Loop for starting components.
|
protected static java.lang.String |
unescape(java.lang.String str)
Unescape a string.
|
public static java.lang.String DATA_PARAMETERCOPY
public static java.lang.String DATA_REALTIMETIMEOUT
public static java.lang.String DATA_SERVICEREGISTRY
public static java.lang.String DATA_SERIALIZATIONSERVICES
public static java.lang.String DATA_TRANSPORTCACHE
public static java.lang.String DATA_NETWORKNAMESCACHE
public static java.lang.String DATA_CMSSTATE
public static java.lang.String DATA_DEFAULT_TIMEOUT
public static java.lang.String DATA_PLATFORMACCESS
public static java.lang.String DATA_BOOTSTRAPFACTORY
protected static final IRwMap<IComponentIdentifier,IRwMap<java.lang.String,java.lang.Object>> platformmem
protected static java.util.Map<IComponentIdentifier,Tuple2<BlockingQueue,java.lang.Thread>> rescuethreads
protected static java.lang.String unescape(java.lang.String str)
public static void main(java.lang.String[] args)
args
- The arguments.java.lang.Exception
public static IFuture<IExternalAccess> createPlatform(java.util.Map<java.lang.String,java.lang.String> args)
args
- The command line arguments.public static IFuture<IExternalAccess> createPlatform(java.lang.String... args)
args
- The command line arguments.public static IFuture<IExternalAccess> createPlatform(IPlatformConfiguration config)
public static IFuture<IExternalAccess> createPlatform()
public static IFuture<IExternalAccess> createPlatform(IPlatformConfiguration pconfig, java.lang.String[] args)
config
- The PlatformConfiguration object.public static boolean getBooleanValueWithArgs(java.util.Map<java.lang.String,java.lang.Object> args, java.lang.String argname, boolean def)
args
- The args map.argname
- The argument name.def
- The default value.public static IFuture<IExternalAccess> createPlatform(IPlatformConfiguration pconfig, java.util.Map<java.lang.String,java.lang.Object> pargs)
config
- The PlatformConfiguration object.protected static IComponentIdentifier createPlatformIdentifier(java.lang.String pfname)
pfname
- The platform name.protected static IFuture<java.lang.Void> startComponents(int i, java.util.List<java.lang.String> components, IInternalAccess instance)
i
- Number to start.components
- The list of components.instance
- The instance.public static void initRescueThread(IComponentIdentifier cid, IPlatformConfiguration rootconfig)
public static void scheduleRescueStep(IComponentIdentifier cid, java.lang.Runnable run)
cid
- The id of a component of the platform.run
- The runnable to execute.public static boolean isRescueThread(IComponentIdentifier cid)
cid
- The id of a component of the platform.public static void shutdownRescueThread(IComponentIdentifier cid)
public static IFuture<IExternalAccess> createProxy(IExternalAccess local, IExternalAccess remote)
public static java.lang.Object getPlatformValue(IComponentIdentifier platform, java.lang.String key)
platform
- The platform name.key
- The key.public static void putPlatformValue(IComponentIdentifier platform, java.lang.String key, java.lang.Object value)
platform
- The platform name.key
- The key.value
- The value.public static boolean hasPlatformValue(IComponentIdentifier platform, java.lang.String key)
platform
- The platform name.key
- The key.public static void removePlatformMemory(IComponentIdentifier platform)
platform
- The platform name.public static long getDefaultTimeout(IComponentIdentifier platform)
public static long getScaledDefaultTimeout(IComponentIdentifier platform, double scale)
public static void setDefaultTimeout(IComponentIdentifier platform, long timeout)
public static boolean isRealtimeTimeout(IComponentIdentifier platform)
public static boolean isParameterCopy(IComponentIdentifier platform)
public static java.util.Map<java.lang.String,java.lang.Object> parseArgs(java.lang.String args)
args
- The command line arguments.public static java.util.Map<java.lang.String,java.lang.Object> parseArgs(java.lang.String[] args)
args
- config
- public static void parseArg(java.lang.String okey, java.lang.String val, java.util.Map<java.lang.String,java.lang.Object> vals)
okey
- val
- config
-