public abstract class CompiledContext extends CompiledNamespace implements ExecutionContext
| Constructor and Description |
|---|
CompiledContext(ExecutionContext ctx)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutionTrace(ExecutionTrace et)
Adds ExecutionTrace to the context.
|
void |
addExecutionTraceElement(ExecutionTraceElement e)
Adds ExecutionTraceElement to the context.
|
void |
addSignal(Object signal)
Adds a signal to the signal queue.
|
void |
flushAll()
Flush of all sessions (core, org, human,...
|
CompiledContext |
getCompiled() |
CompiledContext |
getCompiled(String moduleName) |
CompiledContext |
getCompiledContext()
Returns this compiled context.
|
long |
getContextId()
Returns the context id.
|
ExecutionTrace |
getExecutionTrace() |
Handle |
getHandle(ValueHolder valueHolder)
Returns a serializable handle for the given value-holder.
|
com.whitestein.lsps.model.ContextModelElement |
getModelElement()
Returns the corresponding context model element.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
ExecutionContext |
getParentContext()
Returns the parent execution context or null if it does not exist.
|
String |
getPath()
Returns the full path to this context as a string.
|
QID |
getPathQID()
Returns the full path to this context as a QID.
|
ProcessInstance |
getProcessInstance()
Returns the process instance.
|
protected abstract QID |
getQID() |
InterpreterStackTrace |
getStackTrace()
Returns the interpreter stack trace.
|
String[] |
getStackTraceInfo()
Returns the stack trace info from the interpreter stack trace.
|
ValueHolder |
getValueHolder(Handle handle)
Returns a value-holder for the given handle.
|
Object |
getVariableValue(QID name)
Resolves variable for given name and returns its value.
|
Object |
getVariableValue(String name)
Deprecated.
|
void |
persist(ValueHolder object)
When getting
ValueHolders from the context, they may be later garbage collected. |
Namespace |
resolveVariableNamespace(QID name)
Resolves variable for given name and returns its containing namespace.
|
Namespace |
resolveVariableNamespace(String name)
Deprecated.
|
protected ExecutionContext |
selectContext(ExecutionContext ctx) |
void |
setCompiled(CompiledContext compiledContext) |
void |
setVariableValue(QID name,
Object value)
Resolves variable for given name and sets its value.
|
void |
setVariableValue(String name,
Object value)
Deprecated.
|
addVariable, addVariable, checkRollback, checkRollback, createChildContext, createList, createList, createMap, createMap, createOperationHolder, createOperationHolder, createOperationHolder, createOperationHolder, createRecord, createRecord, createRecordByConstructor, createRecordByConstructor, createReference, createSet, createSet, getCompiledContext, getComponent, getComponent, getConstantValue, getConstantValue, getEvaluationLevel, getEvaluationLevel, getExecutionContext, getModelId, getModelId, getModelProviderService, getModelProviderService, getNamespace, getNamespace, getProcessModel, getProcessModel, getPropertySafe, getReferencedOperation, getReferencedOperation, getStaticVariableValue, getType, getType, getVariableValue, getVariableValue, nullsOrEquals, requireNonNull, special, toboolean, toboolean, toBoolean, toBoolean, toCompiled, toCompiled, toCompiledObject, toCompiledObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentService, getEvaluationLevel, getModelProviderService, getNamespace, getProcessModelpublic CompiledContext(ExecutionContext ctx)
ctx - public CompiledContext getCompiledContext()
getCompiledContext in class CompiledNamespacepublic CompiledContext getCompiled()
getCompiled in interface ExecutionContextpublic void setCompiled(CompiledContext compiledContext)
setCompiled in interface ExecutionContextprotected abstract QID getQID()
protected ExecutionContext selectContext(ExecutionContext ctx)
selectContext in class CompiledNamespacepublic Handle getHandle(ValueHolder valueHolder)
HandleResolverHandleResolver.getValueHolder(Handle).getHandle in interface HandleResolvervalueHolder - the value-holderpublic ValueHolder getValueHolder(Handle handle)
HandleResolvergetValueHolder in interface HandleResolverhandle - the handlepublic void addExecutionTraceElement(ExecutionTraceElement e)
TraceableExecutionExecutionTrace and
ExecutionTraceElement.addExecutionTraceElement in interface TraceableExecutione - ExecutionTraceElement to be added.public void addExecutionTrace(ExecutionTrace et)
TraceableExecutionExecutionTrace and
ExecutionTraceElement.addExecutionTrace in interface TraceableExecutionet - ExecutionTrace to be added.public ExecutionTrace getExecutionTrace()
getExecutionTrace in interface TraceableExecutionExecutionTrace and
ExecutionTraceElement.public Object getVariableValue(QID name)
ExecutionContext
Difference between this method and
Namespace.getVariableValue(String) is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String) on the resolved namespace.
getVariableValue in interface ExecutionContextname - a variable name@Deprecated public Object getVariableValue(String name)
ExecutionContext
Difference between this method and
Namespace.getVariableValue(String) is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String) on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
getVariableValue in interface ExecutionContextname - a variable namepublic void setVariableValue(QID name, Object value)
ExecutionContext
Difference between this method and
Namespace.setVariableValue(String, Object) is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object) on the resolved namespace.
setVariableValue in interface ExecutionContextname - a variable namevalue - a new variable value@Deprecated public void setVariableValue(String name, Object value)
ExecutionContext
Difference between this method and
Namespace.setVariableValue(String, Object) is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object) on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
setVariableValue in interface ExecutionContextname - a variable namevalue - a new variable valuepublic Namespace resolveVariableNamespace(QID name)
ExecutionContext
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException if the variable is not found
or the name is ambiguous.
resolveVariableNamespace in interface ExecutionContextname - variable name@Deprecated public Namespace resolveVariableNamespace(String name)
ExecutionContext
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException if the variable is not found
or the name is ambiguous.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
resolveVariableNamespace in interface ExecutionContextname - variable namepublic void addSignal(Object signal)
ExecutionContextaddSignal in interface ExecutionContextpublic com.whitestein.lsps.model.ContextModelElement getModelElement()
ExecutionContextgetModelElement in interface ExecutionContextpublic long getContextId()
ExecutionContextgetContextId in interface ExecutionContextpublic ExecutionContext getParentContext()
ExecutionContextgetParentContext in interface ExecutionContextpublic void persist(ValueHolder object)
ExecutionContextValueHolders from the context, they may be later garbage collected. This
method ensures that the object will never be garbage collected.persist in interface ExecutionContextobject - object to make persistentpublic QID getPathQID()
ExecutionContextgetPathQID in interface ExecutionContextpublic String getPath()
ExecutionContextgetPath in interface ExecutionContextpublic ModelInstance getModelInstance()
ExecutionContextgetModelInstance in interface ExecutionContextgetModelInstance in class CompiledNamespacepublic ProcessInstance getProcessInstance()
ExecutionContextgetProcessInstance in interface ExecutionContextpublic void flushAll()
ExecutionContextflushAll in interface ExecutionContextpublic InterpreterStackTrace getStackTrace()
ExecutionContexterror exceptions.
The method returns null if the execution context is not a
JavaOperationExecutionContext.
getStackTrace in interface ExecutionContextnullpublic String[] getStackTraceInfo()
ExecutionContextShould be equivalent to
return getStackTrace() != null ? getStackTrace().getStackTraceInfo() : null;
getStackTraceInfo in interface ExecutionContextpublic CompiledContext getCompiled(String moduleName)
getCompiled in interface ExecutionContextCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.