Package com.embabel.agent.spi.support
Class InMemoryContext
-
- All Implemented Interfaces:
-
com.embabel.agent.core.Context,com.embabel.common.core.types.HasInfoString
public final class InMemoryContext implements Context
Simple in-memory implementation of Context.
-
-
Constructor Summary
Constructors Constructor Description InMemoryContext(String id)
-
Method Summary
Modifier and Type Method Description List<Object>getObjects()Entries in the order they were added. StringgetId()May be null for a new context not yet saved. UnitsetId(String id)May be null for a new context not yet saved. Unitbind(String key, Object value)UnitaddObject(Object value)StringinfoString(Boolean verbose, Integer indent)Unitpopulate(Blackboard blackboard)Populate the given blackboard from the context. -
-
Constructor Detail
-
InMemoryContext
InMemoryContext(String id)
-
-
Method Detail
-
getObjects
List<Object> getObjects()
Entries in the order they were added. The default instance of any type is the last one Objects are immutable and may not be removed.
-
infoString
String infoString(Boolean verbose, Integer indent)
-
populate
Unit populate(Blackboard blackboard)
Populate the given blackboard from the context.
-
-
-
-