Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.process
Class StatefulProcessSession

    java.lang.Object
      org.jbpm.process.StatefulProcessSession

All Implemented Interfaces:
  org.drools.core.common.InternalKnowledgeRuntime, KieRuntimeEventManager, ProcessEventManager, WorkingMemoryEventManager, CommandExecutor, KieRuntime, KieSession, ProcessRuntime, StatefulProcessSession, Session, SessionEntryPoint, StatefulRuleSession, org.kie.internal.event.KnowledgeRuntimeEventManager, org.kie.internal.process.CorrelationAwareProcessRuntime, org.kie.internal.runtime.KnowledgeRuntime, org.kie.internal.runtime.StatefulKnowledgeSession

    public class StatefulProcessSession

extends Object
implements org.kie.internal.runtime.StatefulKnowledgeSession, org.drools.core.common.InternalKnowledgeRuntime, org.kie.internal.process.CorrelationAwareProcessRuntime

Field Summary
`protected Queue<org.drools.core.common.WorkingMemoryAction>` | `actionQueue`

Constructor Summary
`StatefulProcessSession(org.kie.internal.KnowledgeBase kbase, KieSessionConfiguration sessionConfiguration, Environment environment)`

Method Summary
`void` | `abortProcessInstance(long processInstanceId)` Aborts the process instance with the given id.
`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.
`ProcessInstance` | `createProcessInstance(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)`
`ProcessInstance` | `createProcessInstance(String processId, Map<String,Object> parameters)` Creates a new process instance (but does not yet start it).
`void` | `delete(FactHandle handle)` Retracts the fact for which the given FactHandle was assigned.
`void` | `destroy()` Destroys session permanently.
`void` | `dispose()` Releases all the current session resources, setting up the session for garbage collection.
`void` | `endOperation()`
`
`<T> T`
` | `execute(Command<T> command)` Execute the command and return a ExecutionResults for the results of the Command.
`void` | `executeQueuedActions()`
`int` | `fireAllRules()` Fire all Matches on the Agenda.
`int` | `fireAllRules(AgendaFilter agendaFilter)` Fire all Matches on the Agenda
`int` | `fireAllRules(AgendaFilter agendaFilter, int i)` Fire all Matches on the Agenda
`int` | `fireAllRules(int max)` Fire Matches on the Agenda up to the given maximum number of Matches, before returning the control to the application.
`void` | `fireUntilHalt()` Keeps firing Matches until a halt is called.
`void` | `fireUntilHalt(AgendaFilter agendaFilter)` Keeps firing Matches until a halt is called.
`Queue<org.drools.core.common.WorkingMemoryAction>` | `getActionQueue()`
`Agenda` | `getAgenda()` Returns a reference to this session's `Agenda`.
`Collection<AgendaEventListener>` | `getAgendaEventListeners()` Returns all event listeners.
`Calendars` | `getCalendars()`
`Map<String,Channel>` | `getChannels()`
`SessionEntryPoint` | `getEntryPoint(String name)` Returns the WorkingMemoryEntryPoint instance associated with the given name.
`String` | `getEntryPointId()` Returns the String Id of this entry point
`Collection<? extends SessionEntryPoint>` | `getEntryPoints()` Returns a collection of all available working memory entry points for this session.
`Environment` | `getEnvironment()`
`long` | `getFactCount()` Returns the total number of facts currently in this entry point
`FactHandle` | `getFactHandle(Object object)` Returns the fact handle associated with the given object.
`
`<T extends FactHandle> Collection<T>`
` | `getFactHandles()` Returns all `FactHandle`s from the current session.
`
`<T extends FactHandle> Collection<T>`
` | `getFactHandles(ObjectFilter filter)` Returns all `FactHandle`s from the current session for which the facts are accepted by the given filter.
`Object` | `getGlobal(String identifier)`
`Globals` | `getGlobals()`
`int` | `getId()`
`org.kie.internal.KnowledgeBase` | `getKieBase()` Returns the KieBase reference from which this stateful session was created.
`long` | `getLastIdleTimestamp()`
`Object` | `getObject(FactHandle factHandle)` Returns the object associated with the given FactHandle.
`Collection<Object>` | `getObjects()` Returns all facts from the current session as a Collection.
`Collection<Object>` | `getObjects(ObjectFilter filter)` Returns all facts from the current session that are accepted by the given `ObjectFilter`.
`Collection<ProcessEventListener>` | `getProcessEventListeners()` Returns all event listeners.
`ProcessInstance` | `getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)`
`ProcessInstance` | `getProcessInstance(long processInstanceId)` Returns the process instance with the given id.
`ProcessInstance` | `getProcessInstance(long processInstanceId, boolean readonly)` Returns the process instance with the given id.
`Collection<ProcessInstance>` | `getProcessInstances()` Returns a collection of currently active process instances.
`InternalProcessRuntime` | `getProcessRuntime()`
`QueryResults` | `getQueryResults(String query, Object... arguments)` Retrieve the QueryResults of the specified query and arguments
`SessionClock` | `getSessionClock()` Returns the session clock instance assigned to this session
`KieSessionConfiguration` | `getSessionConfiguration()`
`org.drools.core.time.TimerService` | `getTimerService()`
`Collection<WorkingMemoryEventListener>` | `getWorkingMemoryEventListeners()` Returns all event listeners.
`WorkItemManager` | `getWorkItemManager()` Returns the `WorkItemManager` related to this session.
`void` | `halt()` Request the engine to stop firing rules.
`FactHandle` | `insert(Object object)` Inserts a new fact into this entry point
`LiveQuery` | `openLiveQuery(String query, Object[] arguments, ViewChangedEventListener listener)`
`void` | `queueWorkingMemoryAction(org.drools.core.common.WorkingMemoryAction action)`
`void` | `registerChannel(String name, Channel channel)`
`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` | `retract(FactHandle handle)` Retracts the fact for which the given FactHandle was assigned.
`void` | `setEndOperationListener(org.drools.core.common.EndOperationListener listener)`
`void` | `setGlobal(String identifier, Object object)` Sets a global value in this session
`void` | `setId(int id)`
`void` | `signalEvent(String type, Object event)` Signals the engine that an event has occurred.
`void` | `signalEvent(String type, Object event, long processInstanceId)` Signals the process instance that an event has occurred.
`void` | `startOperation()`
`ProcessInstance` | `startProcess(String processId)` Start a new process instance.
`ProcessInstance` | `startProcess(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)`
`ProcessInstance` | `startProcess(String processId, Map<String,Object> parameters)` Start a new process instance.
`ProcessInstance` | `startProcessInstance(long processInstanceId)` Starts the given process instance (which was created by using createProcesInstance but not yet started).
`void` | `unregisterChannel(String name)`
`void` | `update(FactHandle handle, Object object)` Updates the fact for which the given FactHandle was assigned with the new fact set as the second parameter in this method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### actionQueue

    protected Queue<org.drools.core.common.WorkingMemoryAction> actionQueue

Constructor Detail

### StatefulProcessSession

    public StatefulProcessSession(org.kie.internal.KnowledgeBase kbase,
                                  KieSessionConfiguration sessionConfiguration,
                                  Environment environment)

Method Detail

### abortProcessInstance

    public void abortProcessInstance(long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Aborts the process instance with the given id. If the process instance has been completed (or aborted), or the process instance cannot be found, this method will throw an `IllegalArgumentException`.

  Specified by:
    `abortProcessInstance` in interface `ProcessRuntime`

### getProcessInstance

    public ProcessInstance getProcessInstance(long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Returns the process instance with the given id. Note that only active process instances will be returned. If a process instance has been completed already, this method will return `null`.

  Specified by:
    `getProcessInstance` in interface `ProcessRuntime`
  Returns:
    the process instance with the given id or `null` if it cannot be found

### getProcessInstance

    public ProcessInstance getProcessInstance(long processInstanceId,
                                              boolean readonly)

  Description copied from interface: `ProcessRuntime`
  Returns the process instance with the given id. Note that only active process instances will be returned. If a process instance has been completed already, this method will return `null`.

  Specified by:
    `getProcessInstance` in interface `ProcessRuntime`
    `readonly` - if this is true and when using persistence, this process instance will not be tracked and updated by the engine
  Returns:
    the process instance with the given id or `null` if it cannot be found

### getProcessInstances

    public Collection<ProcessInstance> getProcessInstances()

  Description copied from interface: `ProcessRuntime`
  Returns a collection of currently active process instances. Note that only process instances that are currently loaded and active inside the engine will be returned. When using persistence, it is likely not all running process instances will be loaded as their state will be stored persistently. It is recommended not to use this method to collect information about the state of your process instances but to use a history log for that purpose.

  Specified by:
    `getProcessInstances` in interface `ProcessRuntime`
  Returns:
    a collection of process instances currently active in the session

### signalEvent

    public void signalEvent(String type,
                            Object event)

  Description copied from interface: `ProcessRuntime`
  Signals the engine that an event has occurred. The type parameter defines which type of event and the event parameter can contain additional information related to the event. All process instances that are listening to this type of (external) event will be notified. For performance reasons, this type of event signaling should only be used if one process instance should be able to notify other process instances. For internal event within one process instance, use the signalEvent method that also include the processInstanceId of the process instance in question.

  Specified by:
    `signalEvent` in interface `ProcessRuntime`
  Parameters:
    `type` - the type of event
    `event` - the data associated with this event

### signalEvent

    public void signalEvent(String type,
                            Object event,
                            long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Signals the process instance that an event has occurred. The type parameter defines which type of event and the event parameter can contain additional information related to the event. All node instances inside the given process instance that are listening to this type of (internal) event will be notified. Note that the event will only be processed inside the given process instance. All other process instances waiting for this type of event will not be notified.

  Specified by:
    `signalEvent` in interface `ProcessRuntime`
  Parameters:
    `type` - the type of event
    `event` - the data associated with this event
    `processInstanceId` - the id of the process instance that should be signaled

### startProcess

    public ProcessInstance startProcess(String processId)

  Description copied from interface: `ProcessRuntime`
  Start a new process instance. The process (definition) that should be used is referenced by the given process id.

  Specified by:
    `startProcess` in interface `ProcessRuntime`
  Parameters:
    `processId` - The id of the process that should be started
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### startProcess

    public ProcessInstance startProcess(String processId,
                                        Map<String,Object> parameters)

  Description copied from interface: `ProcessRuntime`
  Start a new process instance. The process (definition) that should be used is referenced by the given process id. Parameters can be passed to the process instance (as name-value pairs), and these will be set as variables of the process instance.

  Specified by:
    `startProcess` in interface `ProcessRuntime`
  Parameters:
    `processId` - the id of the process that should be started
    `parameters` - the process variables that should be set when starting the process instance
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### createProcessInstance

    public ProcessInstance createProcessInstance(String processId,
                                                 Map<String,Object> parameters)

  Description copied from interface: `ProcessRuntime`
  Creates a new process instance (but does not yet start it). The process (definition) that should be used is referenced by the given process id. Parameters can be passed to the process instance (as name-value pairs), and these will be set as variables of the process instance. You should only use this method if you need a reference to the process instance before actually starting it. Otherwise, use startProcess.

  Specified by:
    `createProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `processId` - the id of the process that should be started
    `parameters` - the process variables that should be set when creating the process instance
  Returns:
    the `ProcessInstance` that represents the instance of the process that was created (but not yet started)

### startProcessInstance

    public ProcessInstance startProcessInstance(long processInstanceId)

  Description copied from interface: `ProcessRuntime`
  Starts the given process instance (which was created by using createProcesInstance but not yet started). This method can only be called once for each process instance. You should only use this method if you need a reference to the process instance before actually starting it. Otherwise, use startProcess.

  Specified by:
    `startProcessInstance` in interface `ProcessRuntime`
  Parameters:
    `processInstanceId` - the id of the process instance that needs to be started
  Returns:
    the `ProcessInstance` that represents the instance of the process that was started

### 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.

### getProcessEventListeners

    public Collection<ProcessEventListener> getProcessEventListeners()

  Description copied from interface: `ProcessEventManager`
  Returns all event listeners.

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

### 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

### getKieBase

    public org.kie.internal.KnowledgeBase getKieBase()

  Description copied from interface: `KieRuntime`
  Returns the KieBase reference from which this stateful session was created.

  Specified by:
    `getKieBase` in interface `KieRuntime`
  Specified by:
    `getKieBase` in interface `org.kie.internal.runtime.StatefulKnowledgeSession`

### getWorkItemManager

    public WorkItemManager getWorkItemManager()

  Description copied from interface: `ProcessRuntime`
  Returns the `WorkItemManager` related to this session. This can be used to register new `WorkItemHandler`s or to complete (or abort) `WorkItem`s.

  Specified by:
    `getWorkItemManager` in interface `ProcessRuntime`
  Returns:
    the `WorkItemManager` related to this session

### getEnvironment

    public Environment getEnvironment()

  Specified by:
    `getEnvironment` in interface `KieRuntime`

### getProcessRuntime

    public InternalProcessRuntime getProcessRuntime()

  Specified by:
    `getProcessRuntime` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### getSessionConfiguration

    public KieSessionConfiguration getSessionConfiguration()

  Specified by:
    `getSessionConfiguration` in interface `KieRuntime`

### getTimerService

    public org.drools.core.time.TimerService getTimerService()

  Specified by:
    `getTimerService` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### startOperation

    public void startOperation()

  Specified by:
    `startOperation` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### endOperation

    public void endOperation()

  Specified by:
    `endOperation` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### executeQueuedActions

    public void executeQueuedActions()

  Specified by:
    `executeQueuedActions` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### getActionQueue

    public Queue<org.drools.core.common.WorkingMemoryAction> getActionQueue()

  Specified by:
    `getActionQueue` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### queueWorkingMemoryAction

    public void queueWorkingMemoryAction(org.drools.core.common.WorkingMemoryAction action)

  Specified by:
    `queueWorkingMemoryAction` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### dispose

    public void dispose()

  Description copied from interface: `KieSession`
  Releases all the current session resources, setting up the session for garbage collection. This method must always be called after finishing using the session, or the engine will not free the memory used by the session.

  Specified by:
    `dispose` in interface `KieSession`

### setId

    public void setId(int id)

  Specified by:
    `setId` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### getId

    public int getId()

  Specified by:
    `getId` in interface `KieSession`

### setEndOperationListener

    public void setEndOperationListener(org.drools.core.common.EndOperationListener listener)

  Specified by:
    `setEndOperationListener` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### fireAllRules

    public int fireAllRules()

  Description copied from interface: `StatefulRuleSession`
  Fire all Matches on the Agenda.

  Specified by:
    `fireAllRules` in interface `StatefulRuleSession`
  Returns:
    returns the number of rules fired

### fireAllRules

    public int fireAllRules(int max)

  Description copied from interface: `StatefulRuleSession`
  Fire Matches on the Agenda up to the given maximum number of Matches, before returning the control to the application. In case the application wants to continue firing the rules later, from the point where it stopped, it just needs to call `fireAllRules()` again.

  Specified by:
    `fireAllRules` in interface `StatefulRuleSession`
  Parameters:
    `max` - the maximum number of rules that should be fired
  Returns:
    returns the number of rules fired

### fireAllRules

    public int fireAllRules(AgendaFilter agendaFilter)

  Description copied from interface: `StatefulRuleSession`
  Fire all Matches on the Agenda

  Specified by:
    `fireAllRules` in interface `StatefulRuleSession`
  Parameters:
    `agendaFilter` - filters the Matches that may fire
  Returns:
    returns the number of rules fired

### fireAllRules

    public int fireAllRules(AgendaFilter agendaFilter,
                            int i)

  Description copied from interface: `StatefulRuleSession`
  Fire all Matches on the Agenda

  Specified by:
    `fireAllRules` in interface `StatefulRuleSession`
  Parameters:
    `agendaFilter` - filters the Matches that may fire
    `i` - the maximum number of rules that should be fired
  Returns:
    returns the number of rules fired

### fireUntilHalt

    public void fireUntilHalt()

  Description copied from interface: `StatefulRuleSession`
  Keeps firing Matches until a halt is called. If in a given moment, there is no Match to fire, it will wait for an Match to be added to an active agenda group or rule flow group. This blocks the thread until halt is called.

  Specified by:
    `fireUntilHalt` in interface `StatefulRuleSession`

### fireUntilHalt

    public void fireUntilHalt(AgendaFilter agendaFilter)

  Description copied from interface: `StatefulRuleSession`
  Keeps firing Matches until a halt is called. If in a given moment, there is no Match to fire, it will wait for an Match to be added to an active agenda group or rule flow group. This blocks the thread until halt is called.

  Specified by:
    `fireUntilHalt` in interface `StatefulRuleSession`
  Parameters:
    `agendaFilter` - filters the Matches that may fire

### 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:

### getCalendars

    public Calendars getCalendars()

  Specified by:
    `getCalendars` in interface `KieRuntime`

### getChannels

    public Map<String,Channel> getChannels()

  Specified by:
    `getChannels` in interface `KieRuntime`

### getGlobal

    public Object getGlobal(String identifier)

  Specified by:
    `getGlobal` in interface `KieRuntime`

### getGlobals

    public Globals getGlobals()

  Specified by:
    `getGlobals` in interface `KieRuntime`

### getSessionClock

    public SessionClock getSessionClock()

  Description copied from interface: `KieRuntime`
  Returns the session clock instance assigned to this session

  Specified by:
    `getSessionClock` in interface `KieRuntime`
  Returns:

### registerChannel

    public void registerChannel(String name,
                                Channel channel)

  Specified by:
    `registerChannel` in interface `KieRuntime`

### setGlobal

    public void setGlobal(String identifier,
                          Object object)

  Description copied from interface: `KieRuntime`
  Sets a global value in this session

  Specified by:
    `setGlobal` in interface `KieRuntime`
  Parameters:
    `identifier` - the global identifier
    `object` - the value assigned to the global identifier

### unregisterChannel

    public void unregisterChannel(String name)

  Specified by:
    `unregisterChannel` in interface `KieRuntime`

### getAgenda

    public Agenda getAgenda()

  Description copied from interface: `Session`
  Returns a reference to this session's `Agenda`.

  Specified by:
    `getAgenda` in interface `Session`
  Returns:

### getQueryResults

    public QueryResults getQueryResults(String query,
                                        Object... arguments)

  Description copied from interface: `Session`
  Retrieve the QueryResults of the specified query and arguments

  Specified by:
    `getQueryResults` in interface `Session`
  Parameters:
    `query` - The name of the query.
    `arguments` - The arguments used for the query
  Returns:
    The QueryResults of the specified query. If the query does not exist or no results match the query it is empty.

### getEntryPoint

    public SessionEntryPoint getEntryPoint(String name)

  Description copied from interface: `Session`
  Returns the WorkingMemoryEntryPoint instance associated with the given name.

  Specified by:
    `getEntryPoint` in interface `Session`
  Returns:

### getEntryPoints

    public Collection<? extends SessionEntryPoint> getEntryPoints()

  Description copied from interface: `Session`
  Returns a collection of all available working memory entry points for this session.

  Specified by:
    `getEntryPoints` in interface `Session`
  Returns:
    the collection of all available entry points for this session

### halt

    public void halt()

  Description copied from interface: `Session`

  Request the engine to stop firing rules. If the engine is currently firing a rule, it will finish executing this rule's consequence before stopping.

  This method will not remove active Matches from the Agenda. In case the application later wants to continue firing rules from the point where it stopped, it should just call `org.kie.api.runtime.StatefulKnowledgeSession.fireAllRules()` or `org.kie.api.runtime.StatefulKnowledgeSession.fireUntilHalt()` again.

  Specified by:
    `halt` in interface `Session`

### openLiveQuery

    public LiveQuery openLiveQuery(String query,
                                   Object[] arguments,
                                   ViewChangedEventListener listener)

  Specified by:
    `openLiveQuery` in interface `Session`

### getEntryPointId

    public String getEntryPointId()

  Description copied from interface: `SessionEntryPoint`
  Returns the String Id of this entry point

  Specified by:
    `getEntryPointId` in interface `SessionEntryPoint`
  Returns:

### getFactCount

    public long getFactCount()

  Description copied from interface: `SessionEntryPoint`
  Returns the total number of facts currently in this entry point

  Specified by:
    `getFactCount` in interface `SessionEntryPoint`
  Returns:

### getFactHandle

    public FactHandle getFactHandle(Object object)

  Description copied from interface: `SessionEntryPoint`
  Returns the fact handle associated with the given object. It is important to note that this method behaves in accordance with the configured assert behaviour for this knowledge base (either IDENTITY or EQUALITY).

  Specified by:
    `getFactHandle` in interface `SessionEntryPoint`
  Parameters:
    `object` - the fact for which the fact handle will be returned.
  Returns:
    the fact handle for the given object, or null in case no fact handle was found for the given object.
  See Also:
    `KnowledgeBaseConfiguration`

### getFactHandles

    public <T extends FactHandle> Collection<T> getFactHandles()

  Description copied from interface: `SessionEntryPoint`
  Returns all `FactHandle`s from the current session.

  Specified by:
    `getFactHandles` in interface `SessionEntryPoint`
  Returns:

### getFactHandles

    public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter)

  Description copied from interface: `SessionEntryPoint`
  Returns all `FactHandle`s from the current session for which the facts are accepted by the given filter.

  Specified by:
    `getFactHandles` in interface `SessionEntryPoint`
  Parameters:
    `filter` - the filter to be applied to the returned collection of `FactHandle`s.
  Returns:

### getObject

    public Object getObject(FactHandle factHandle)

  Description copied from interface: `SessionEntryPoint`
  Returns the object associated with the given FactHandle.

  Specified by:
    `getObject` in interface `SessionEntryPoint`
  Returns:

### getObjects

    public Collection<Object> getObjects()

  Description copied from interface: `SessionEntryPoint`

  Returns all facts from the current session as a Collection.

  This class is not a general-purpose `Collection` implementation! While this class implements the `Collection` interface, it intentionally violates `Collection` general contract, which mandates the use of the `equals` method when comparing objects.

  Instead the approach used when comparing objects with the `contains(Object)` method is dependent on the WorkingMemory configuration, where it can be configured for `Identity` or for `Equality`.

  Specified by:
    `getObjects` in interface `SessionEntryPoint`
  Returns:

### getObjects

    public Collection<Object> getObjects(ObjectFilter filter)

  Description copied from interface: `SessionEntryPoint`
  Returns all facts from the current session that are accepted by the given `ObjectFilter`.

  Specified by:
    `getObjects` in interface `SessionEntryPoint`
  Parameters:
    `filter` - the filter to be applied to the returned collection of facts.
  Returns:

### insert

    public FactHandle insert(Object object)

  Description copied from interface: `SessionEntryPoint`
  Inserts a new fact into this entry point

  Specified by:
    `insert` in interface `SessionEntryPoint`
  Parameters:
    `object` - the fact to be inserted
  Returns:
    the fact handle created for the given fact

### retract

    public void retract(FactHandle handle)

  Description copied from interface: `SessionEntryPoint`
  Retracts the fact for which the given FactHandle was assigned.

  Specified by:
    `retract` in interface `SessionEntryPoint`
  Parameters:
    `handle` - the handle whose fact is to be retracted.

### delete

    public void delete(FactHandle handle)

  Description copied from interface: `SessionEntryPoint`
  Retracts the fact for which the given FactHandle was assigned.

  Specified by:
    `delete` in interface `SessionEntryPoint`
  Parameters:
    `handle` - the handle whose fact is to be retracted.

### update

    public void update(FactHandle handle,
                       Object object)

  Description copied from interface: `SessionEntryPoint`
  Updates the fact for which the given FactHandle was assigned with the new fact set as the second parameter in this method.

  Specified by:
    `update` in interface `SessionEntryPoint`
  Parameters:
    `handle` - the FactHandle for the fact to be updated.
    `object` - the new value for the fact being updated.

### 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.

### 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.

### getAgendaEventListeners

    public Collection<AgendaEventListener> getAgendaEventListeners()

  Description copied from interface: `WorkingMemoryEventManager`
  Returns all event listeners.

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

### getWorkingMemoryEventListeners

    public Collection<WorkingMemoryEventListener> getWorkingMemoryEventListeners()

  Description copied from interface: `WorkingMemoryEventManager`
  Returns all event listeners.

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

### 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.

### 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.

### getLastIdleTimestamp

    public long getLastIdleTimestamp()

  Specified by:
    `getLastIdleTimestamp` in interface `org.drools.core.common.InternalKnowledgeRuntime`

### startProcess

    public ProcessInstance startProcess(String processId,
                                        org.kie.internal.process.CorrelationKey correlationKey,
                                        Map<String,Object> parameters)

  Specified by:
    `startProcess` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### createProcessInstance

    public ProcessInstance createProcessInstance(String processId,
                                                 org.kie.internal.process.CorrelationKey correlationKey,
                                                 Map<String,Object> parameters)

  Specified by:
    `createProcessInstance` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### getProcessInstance

    public ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)

  Specified by:
    `getProcessInstance` in interface `org.kie.internal.process.CorrelationAwareProcessRuntime`

### destroy

    public void destroy()

  Description copied from interface: `KieSession`
  Destroys session permanently. In case of session state being persisted in data store it will be removed from it otherwise it falls back to default dispose() method. NOTE: Name and location of this method will most likely change before 6.0.Final as it applies only to persistent sessions

  Specified by:
    `destroy` in interface `KieSession`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.Beta5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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