|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StatelessSession
This represents a working memory session where state is not kept between invocations. This is typically used for "decision services" where the rules are provided all the data in one hit, and a conclusion reached by the engine. (there is no accumulation of facts/knowledge - each invocation is on a fresh session). Each created StatelessSession can be call execute() any number of times, in a stateless manner however the GlobalResolver, unless set each time, is shared between each execute() method call. Care should be used when using the async versions of the methods, consult the javadoc for the specific information.
Method Summary | |
---|---|
void |
asyncExecute(Collection collection)
This will assert the object List (as SEPARATE facts) in the background. |
void |
asyncExecute(Object object)
This will assert the object in the background. |
void |
asyncExecute(Object[] array)
This will assert the object array (as SEPARATE facts) in the background. |
void |
execute(Collection collection)
Insert a List of facts, an fire the rules, returning when finished. |
void |
execute(Object object)
Insert a single fact, an fire the rules, returning when finished. |
void |
execute(Object[] array)
Insert an array of facts, an fire the rules, returning when finished. |
StatelessSessionResult |
executeWithResults(Collection collection)
Similar to the normal execute method, but this will return "results". |
StatelessSessionResult |
executeWithResults(Object object)
Similar to the normal execute method, but this will return "results". |
StatelessSessionResult |
executeWithResults(Object[] array)
Similar to the normal execute method, but this will return "results". |
void |
setAgendaFilter(AgendaFilter agendaFilter)
|
void |
setGlobal(String identifer,
Object value)
Sets a global value |
void |
setGlobalExporter(GlobalExporter globalExporter)
Used to specify a global exporting strategy so that global variables can be available to StatelessSessionResults. |
void |
setGlobalResolver(GlobalResolver globalResolver)
Delegate used to resolve any global names not found in the global map. |
Methods inherited from interface org.drools.WorkingMemoryEventManager |
---|
addEventListener, addEventListener, getAgendaEventListeners, getWorkingMemoryEventListeners, removeEventListener, removeEventListener |
Methods inherited from interface org.drools.RuleBaseEventManager |
---|
addEventListener, getRuleBaseEventListeners, removeEventListener |
Method Detail |
---|
void setAgendaFilter(AgendaFilter agendaFilter)
void setGlobalResolver(GlobalResolver globalResolver)
globalResolver
- void setGlobal(String identifer, Object value)
identifer
- value
- void setGlobalExporter(GlobalExporter globalExporter)
globalExporter
- The GlobalExporter instancevoid execute(Object object)
void execute(Object[] array)
void execute(Collection collection)
void asyncExecute(Object object)
void asyncExecute(Object[] array)
void asyncExecute(Collection collection)
StatelessSessionResult executeWithResults(Object object)
StatelessSessionResult executeWithResults(Object[] array)
StatelessSessionResult executeWithResults(Collection collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |