Package org.drools.core.command.impl
Class ContextImpl
- java.lang.Object
-
- org.drools.core.command.impl.ContextImpl
-
- All Implemented Interfaces:
org.kie.api.runtime.Context
,org.kie.internal.command.RegistryContext
- Direct Known Subclasses:
ContextImplWithEviction
,RequestContextImpl
public class ContextImpl extends Object implements org.kie.internal.command.RegistryContext
-
-
Field Summary
Fields Modifier and Type Field Description static AtomicInteger
ID_GENERATOR
static String
REGISTRY
-
Constructor Summary
Constructors Constructor Description ContextImpl()
ContextImpl(String name, org.kie.internal.command.ContextManager manager)
ContextImpl(String name, org.kie.internal.command.ContextManager manager, org.kie.api.runtime.Context delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(String identifier)
org.kie.internal.command.ContextManager
getContextManager()
String
getName()
boolean
has(String identifier)
<T> T
lookup(Class<T> clazz)
<T> ContextImpl
register(Class<T> clazz, T instance)
void
remove(String identifier)
void
set(String identifier, Object value)
String
toString()
-
-
-
Field Detail
-
ID_GENERATOR
public static final AtomicInteger ID_GENERATOR
-
REGISTRY
public static final String REGISTRY
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public Object get(String identifier)
- Specified by:
get
in interfaceorg.kie.api.runtime.Context
-
set
public void set(String identifier, Object value)
- Specified by:
set
in interfaceorg.kie.api.runtime.Context
-
remove
public void remove(String identifier)
- Specified by:
remove
in interfaceorg.kie.api.runtime.Context
-
has
public boolean has(String identifier)
- Specified by:
has
in interfaceorg.kie.api.runtime.Context
-
getContextManager
public org.kie.internal.command.ContextManager getContextManager()
- Specified by:
getContextManager
in interfaceorg.kie.internal.command.RegistryContext
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.kie.api.runtime.Context
-
register
public <T> ContextImpl register(Class<T> clazz, T instance)
- Specified by:
register
in interfaceorg.kie.internal.command.RegistryContext
-
lookup
public <T> T lookup(Class<T> clazz)
- Specified by:
lookup
in interfaceorg.kie.internal.command.RegistryContext
-
-