public final class RuntimeContext extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | RuntimeContext.ExecutionModeRepresents execution type. | 
| Modifier and Type | Field and Description | 
|---|---|
| static RuntimeContext | DEFAULTDefault context. | 
| static String | KEY_BATCH_IDThe value map key of  batchId(String). | 
| static String | KEY_BUILD_DATEThe value map key of build date. | 
| static String | KEY_BUILD_IDThe value map key of  buildId(String). | 
| static String | KEY_EXECUTION_MODEThe value map key of  mode(ExecutionMode). | 
| static String | KEY_FLOW_IDThe value map key of flow ID. | 
| static String | KEY_RUNTIME_VERSIONThe value map key of  runtime version. | 
| static String | PATH_APPLICATION_INFOThe relative path from classpath of application info. | 
| Modifier and Type | Method and Description | 
|---|---|
| RuntimeContext | apply(Map<String,String> newValueMap)Creates an inherited context from a value map. | 
| RuntimeContext | batchId(String newValue)Creates an inherited context with specified batch ID. | 
| RuntimeContext | buildId(String newValue)Creates an inherited context with specified verification code. | 
| boolean | canExecute(Object object)Returns whether target object is executable in current execution mode. | 
| boolean | equals(Object obj) | 
| static RuntimeContext | get()Returns the global context. | 
| static String | getRuntimeVersion()Returns the current runtime version. | 
| int | hashCode() | 
| boolean | isSimulation()Returns whether this execution is in simulation mode. | 
| RuntimeContext | mode(RuntimeContext.ExecutionMode newValue)Creates an inherited context with specified execution mode. | 
| static void | set(RuntimeContext context)Replaces the global context. | 
| String | toString() | 
| Map<String,String> | unapply()Creates a value map that describes this context. | 
| void | verifyApplication(ClassLoader classLoader)Verifies application by using current context. | 
public static final RuntimeContext DEFAULT
public static final String PATH_APPLICATION_INFO
KEY_BATCH_ID) KEY_FLOW_ID) KEY_BUILD_ID) public static final String KEY_EXECUTION_MODE
mode(ExecutionMode).apply(Map), 
unapply(), 
Constant Field Valuespublic static final String KEY_BATCH_ID
batchId(String).apply(Map), 
unapply(), 
Constant Field Valuespublic static final String KEY_FLOW_ID
public static final String KEY_BUILD_ID
buildId(String).apply(Map), 
unapply(), 
Constant Field Valuespublic static final String KEY_BUILD_DATE
public static final String KEY_RUNTIME_VERSION
runtime version.public static RuntimeContext get()
public static void set(RuntimeContext context)
context - the replacementIllegalArgumentException - if some parameters were nullpublic static String getRuntimeVersion()
public RuntimeContext mode(RuntimeContext.ExecutionMode newValue)
newValue - execution modeIllegalArgumentException - if some parameters were nullpublic RuntimeContext batchId(String newValue)
newValue - batch ID, or null to unset batch IDpublic RuntimeContext buildId(String newValue)
newValue - verification code, or null to unset verification codepublic RuntimeContext apply(Map<String,String> newValueMap)
newValueMap - value mapIllegalArgumentException - if some parameters were nullKEY_BATCH_ID, 
KEY_EXECUTION_MODE, 
KEY_BUILD_IDpublic Map<String,String> unapply()
apply(Map)public boolean isSimulation()
true if this execution is in simulation mode, otherwise falsepublic boolean canExecute(Object object)
object - target objecttrue if is executable, otherwise falseIllegalArgumentException - if some parameters were nullpublic void verifyApplication(ClassLoader classLoader)
classLoader - application classesInconsistentApplicationException - if failed to verifyIllegalArgumentException - if some parameters were nullCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.