Knowledge API Legacy5 Adapter 6.0.0.Beta5

org.drools.impl.adapters
Class StatelessKnowledgeSessionAdapter

java.lang.Object
  extended by org.drools.impl.adapters.StatelessKnowledgeSessionAdapter
All Implemented Interfaces:
KnowledgeRuntimeEventManager, ProcessEventManager, WorkingMemoryEventManager, CommandExecutor, StatelessProcessSession, StatelessRuleSession, StatelessKnowledgeSession

public class StatelessKnowledgeSessionAdapter
extends Object
implements StatelessKnowledgeSession


Constructor Summary
StatelessKnowledgeSessionAdapter(org.kie.internal.runtime.StatelessKnowledgeSession delegate)
           
 
Method Summary
 void addEventListener(AgendaEventListener listener)
          Add an event listener.
 void addEventListener(ProcessEventListener listener)
          Add a process event listener.
 void addEventListener(WorkingMemoryEventListener listener)
          Add an event listener.
<T> T
execute(Command<T> command)
          Execute the command and return a ExecutionResults for the results of the Command.
 void execute(Iterable objects)
          Execute a StatelessKnowledSession, iterate the Iterable inserting each of it's elements.
 void execute(Object object)
          Execute a StatelessKnowledSession inserting just a single object.
 Collection<AgendaEventListener> getAgendaEventListeners()
          Returns all event listeners.
 Globals getGlobals()
          Return the Globals store
 Collection<ProcessEventListener> getProcessEventListeners()
          Returns all event listeners.
 Collection<WorkingMemoryEventListener> getWorkingMemoryEventListeners()
          Returns all event listeners.
 void removeEventListener(AgendaEventListener listener)
          Remove an event listener.
 void removeEventListener(ProcessEventListener listener)
          Remove a process event listener.
 void removeEventListener(WorkingMemoryEventListener listener)
          Remove an event listener.
 void setGlobal(String identifer, Object value)
          Sets a global value on the globals store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessKnowledgeSessionAdapter

public StatelessKnowledgeSessionAdapter(org.kie.internal.runtime.StatelessKnowledgeSession delegate)
Method Detail

getGlobals

public Globals getGlobals()
Description copied from interface: StatelessKnowledgeSession
Return the Globals store

Specified by:
getGlobals in interface StatelessKnowledgeSession

setGlobal

public void setGlobal(String identifer,
                      Object value)
Description copied from interface: StatelessKnowledgeSession
Sets a global value on the globals store

Specified by:
setGlobal in interface StatelessKnowledgeSession
Parameters:
identifer - the global identifier
value - the value assigned to the global identifier

execute

public <T> T execute(Command<T> command)
Description copied from interface: CommandExecutor
Execute the command and return a ExecutionResults for the results of the Command.

Specified by:
execute in interface CommandExecutor
Returns:

addEventListener

public void addEventListener(ProcessEventListener listener)
Description copied from interface: ProcessEventManager
Add a process event listener.

Specified by:
addEventListener in interface ProcessEventManager
Parameters:
listener - the listener to add.

removeEventListener

public void removeEventListener(ProcessEventListener listener)
Description copied from interface: ProcessEventManager
Remove a process event listener.

Specified by:
removeEventListener in interface ProcessEventManager
Parameters:
listener - the listener to remove

getProcessEventListeners

public Collection<ProcessEventListener> getProcessEventListeners()
Description copied from interface: ProcessEventManager
Returns all event listeners.

Specified by:
getProcessEventListeners in interface ProcessEventManager
Returns:
listeners the listeners

execute

public void execute(Object object)
Description copied from interface: StatelessRuleSession
Execute a StatelessKnowledSession inserting just a single object. If a collection (or any other Iterable) or an array is used here, it will be inserted as-is, It will not be iterated and it's internal elements inserted.

Specified by:
execute in interface StatelessRuleSession

execute

public void execute(Iterable objects)
Description copied from interface: StatelessRuleSession
Execute a StatelessKnowledSession, iterate the Iterable inserting each of it's elements. If you have an array, use the Arrays.asList(...) method to make that array Iterable.

Specified by:
execute in interface StatelessRuleSession

addEventListener

public void addEventListener(WorkingMemoryEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Add an event listener.

Specified by:
addEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to add.

removeEventListener

public void removeEventListener(WorkingMemoryEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Remove an event listener.

Specified by:
removeEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to remove.

getWorkingMemoryEventListeners

public Collection<WorkingMemoryEventListener> getWorkingMemoryEventListeners()
Description copied from interface: WorkingMemoryEventManager
Returns all event listeners.

Specified by:
getWorkingMemoryEventListeners in interface WorkingMemoryEventManager
Returns:
listeners The listeners.

addEventListener

public void addEventListener(AgendaEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Add an event listener.

Specified by:
addEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to add.

removeEventListener

public void removeEventListener(AgendaEventListener listener)
Description copied from interface: WorkingMemoryEventManager
Remove an event listener.

Specified by:
removeEventListener in interface WorkingMemoryEventManager
Parameters:
listener - The listener to remove.

getAgendaEventListeners

public Collection<AgendaEventListener> getAgendaEventListeners()
Description copied from interface: WorkingMemoryEventManager
Returns all event listeners.

Specified by:
getAgendaEventListeners in interface WorkingMemoryEventManager
Returns:
listeners The listeners.

Knowledge API Legacy5 Adapter 6.0.0.Beta5

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.