org.drools
Interface WorkingMemoryEntryPoint

All Superinterfaces:
org.drools.runtime.rule.WorkingMemoryEntryPoint
All Known Subinterfaces:
InternalWorkingMemory, InternalWorkingMemoryActions, StatefulSession, WorkingMemory
All Known Implementing Classes:
AbstractWorkingMemory, ReteooStatefulSession, ReteooWorkingMemory

public interface WorkingMemoryEntryPoint
extends org.drools.runtime.rule.WorkingMemoryEntryPoint

An interface for instances that allow handling of entry-point-scoped facts


Method Summary
 WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)
           
 FactHandle insert(Object object)
          Assert a fact.
 FactHandle insert(Object object, boolean dynamic)
          Insert a fact registering JavaBean PropertyChangeListeners on the Object to automatically trigger update calls if dynamic is true.
 void retract(org.drools.runtime.rule.FactHandle handle)
          Retract a fact.
 void update(org.drools.runtime.rule.FactHandle handle, Object object)
          Inform the WorkingMemory that a Fact has been modified and that it should now update the network.
 
Methods inherited from interface org.drools.runtime.rule.WorkingMemoryEntryPoint
getEntryPointId, getFactCount, getFactHandle, getFactHandles, getFactHandles, getObject, getObjects, getObjects
 

Method Detail

insert

FactHandle insert(Object object)
                  throws FactException
Assert a fact.

Specified by:
insert in interface org.drools.runtime.rule.WorkingMemoryEntryPoint
Parameters:
object - The fact object.
Returns:
The new fact-handle associated with the object.
Throws:
FactException - If a RuntimeException error occurs.

insert

FactHandle insert(Object object,
                  boolean dynamic)
                  throws FactException
Insert a fact registering JavaBean PropertyChangeListeners on the Object to automatically trigger update calls if dynamic is true.

Parameters:
object - The fact object.
dynamic - true if Drools should add JavaBean PropertyChangeListeners to the object.
Returns:
The new fact-handle associated with the object.
Throws:
FactException - If a RuntimeException error occurs.

retract

void retract(org.drools.runtime.rule.FactHandle handle)
             throws FactException
Retract a fact.

Specified by:
retract in interface org.drools.runtime.rule.WorkingMemoryEntryPoint
Parameters:
handle - The fact-handle associated with the fact to retract.
Throws:
FactException - If a RuntimeException error occurs.

update

void update(org.drools.runtime.rule.FactHandle handle,
            Object object)
            throws FactException
Inform the WorkingMemory that a Fact has been modified and that it should now update the network.

Specified by:
update in interface org.drools.runtime.rule.WorkingMemoryEntryPoint
Parameters:
handle - The fact-handle associated with the fact to modify.
object - The new value of the fact.
Throws:
FactException - If a RuntimeException error occurs.

getWorkingMemoryEntryPoint

WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.