Package org.drools.core.world.impl
Class ContextManagerImpl
- java.lang.Object
-
- org.drools.core.world.impl.ContextManagerImpl
-
- All Implemented Interfaces:
org.kie.api.runtime.CommandExecutor
,org.kie.internal.command.ContextManager
public class ContextManagerImpl extends Object implements org.kie.internal.command.ContextManager, org.kie.api.runtime.CommandExecutor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ContextManagerImpl.CommandExecutionHandler
static class
ContextManagerImpl.DefaultCommandExecutionHandler
-
Constructor Summary
Constructors Constructor Description ContextManagerImpl()
ContextManagerImpl(Map<String,org.kie.api.runtime.Context> contexts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.kie.api.runtime.Context
createContext(String identifier)
<T> T
execute(org.kie.api.command.Command<T> command)
Object
get(String identifier)
org.kie.api.runtime.Context
getContext(String identifier)
org.kie.api.runtime.Context
getRootContext()
void
remove(String identifier)
void
set(String identifier, Object value)
void
setCommandExecutionHandler(ContextManagerImpl.CommandExecutionHandler executionHandler)
-
-
-
Field Detail
-
ROOT
public static String ROOT
-
-
Method Detail
-
execute
public <T> T execute(org.kie.api.command.Command<T> command)
- Specified by:
execute
in interfaceorg.kie.api.runtime.CommandExecutor
-
setCommandExecutionHandler
public void setCommandExecutionHandler(ContextManagerImpl.CommandExecutionHandler executionHandler)
-
createContext
public org.kie.api.runtime.Context createContext(String identifier)
- Specified by:
createContext
in interfaceorg.kie.internal.command.ContextManager
-
getContext
public org.kie.api.runtime.Context getContext(String identifier)
- Specified by:
getContext
in interfaceorg.kie.internal.command.ContextManager
-
getRootContext
public org.kie.api.runtime.Context getRootContext()
-
remove
public void remove(String identifier)
-
-