public interface IExecutionContext extends IContext
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LOGGER_NAME
Default logger used for execution contexts.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(String msg)
Writes a debug message.
|
void |
debugEntering()
Forces to enter a log sub-phase without logging any message.
|
void |
debugEntering(String msg)
Increments Debug Level : When entering into a sub-phase.
|
void |
debugExiting()
Forces to exit a log sub-phase without logging any message.
|
void |
debugExiting(String msg)
Decreases Debug Level : When exiting from a sub-phase.
|
void |
debugParent(String msg)
Writes a debug message indented once less (if possible).
|
void |
debugSub(String msg)
Writes a debug message indented once more.
|
IExecutionResult |
execute()
Convenience method to execute the MRuleExecutionSet of this context with this context.
|
Object |
getCachedData(IAddon a)
Retrieves data cached by
setCachedData(IAddon, Object) . |
ExtPropertySource |
getCachedPropertySource(Object src)
Internal use only: Drastically disminuish memory footprint by caching Property Source Object.
|
ExtPropertySource |
getCachedPropertySource(Object src,
Class<?> defaultSrcType)
Internal use only: Drastically disminuish memory footprint by caching Property Source Object.
|
Appendable |
getErr() |
String |
getLogSpaces()
Get spaces corresponding to stack level.
|
Appendable |
getOut() |
String |
getParentLogSpaces()
Get spaces corresponding to stack level indented once less (if possible).
|
Object |
getReadBase()
Returns base object for property read access.
|
IExecutionContext |
getRootContext()
In case of sub context usage, this allows to access the root context.
|
MExecutionContext<Object> |
getSubContextForNewBases(Object newBases)
Gets a new Execution Context instance, modifying the following behaviours :
Read and write bases are the provided newBases
Cache is disabled
|
MInOutExecutionContext<Object,Object> |
getSubContextForNewBases(Object newReadBase,
Object newWriteBase)
Gets a new Execution Context instance, modifying the following behaviours :
Read and write bases are the provided newReadBase and newWriteBase
Cache is disabled
|
MInOutExecutionContext<Object,Object> |
getSubContextForNewVariables()
Gets a new Execution Context instance, modifying the following behaviours :
Variables repository is different
|
String |
getSubLogSpaces()
Get spaces corresponding to stack level indented once more.
|
Object |
getWriteBase()
Returns base object for property write access.
|
boolean |
hasCachedData(IAddon a)
Tells if data are cached by
setCachedData(IAddon, Object) , included null value. |
void |
init()
INTERNAL USE ONLY: Called by rule engine to initialize and check before execution.
|
boolean |
isDebugEnabled()
Debug is enabled if LOGGER has debug enabled.
|
void |
resetCachedData()
Resets all cached data for all addons.
|
Object |
resetCachedData(IAddon a)
Resets cached data for one addons, returning previously cached data.
|
Object |
setCachedData(IAddon a,
Object o)
Allows to cache data for a given addon.
|
getExecutionSet, getImports, getLog, getPhase, getReadBaseType, getSecurityManager, getVariables, getWriteBaseType, setExecutionSet, setLoggerName
static final String DEFAULT_LOGGER_NAME
String getLogSpaces()
String getSubLogSpaces()
String getParentLogSpaces()
void debugEntering()
void debugEntering(String msg)
void debug(String msg)
void debugSub(String msg)
void debugParent(String msg)
void debugExiting()
void debugExiting(String msg)
boolean isDebugEnabled()
IExecutionResult execute() throws MExecutionException
MExecutionException
void init() throws MExecutionException
MExecutionException
Object setCachedData(IAddon a, Object o)
Object getCachedData(IAddon a)
setCachedData(IAddon, Object)
.boolean hasCachedData(IAddon a)
setCachedData(IAddon, Object)
, included null value.Object resetCachedData(IAddon a)
IAddon.resetCachedData(IExecutionContext)
.void resetCachedData()
Appendable getOut()
Appendable getErr()
ExtPropertySource getCachedPropertySource(Object src)
ExtPropertySource getCachedPropertySource(Object src, Class<?> defaultSrcType)
Object getReadBase()
Object getWriteBase()
MExecutionContext<Object> getSubContextForNewBases(Object newBases)
MInOutExecutionContext<Object,Object> getSubContextForNewBases(Object newReadBase, Object newWriteBase)
MInOutExecutionContext<Object,Object> getSubContextForNewVariables()
IExecutionContext getRootContext()
IContext
getRootContext
in interface IContext