org.drools.common
Class NamedEntryPoint

java.lang.Object
  extended by org.drools.common.NamedEntryPoint
All Implemented Interfaces:
PropertyChangeListener, EventListener, InternalWorkingMemoryEntryPoint, org.drools.runtime.rule.WorkingMemoryEntryPoint

public class NamedEntryPoint
extends Object
implements InternalWorkingMemoryEntryPoint, WorkingMemoryEntryPoint, PropertyChangeListener


Field Summary
protected static Class[] ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES
           
protected  Object[] addRemovePropertyChangeListenerArgs
          The arguments used when adding/removing a property change listener.
protected  EntryPoint entryPoint
           
protected  EntryPointNode entryPointNode
           
protected  ReentrantLock lock
           
protected  ObjectStore objectStore
           
protected  InternalRuleBase ruleBase
           
 
Constructor Summary
NamedEntryPoint(EntryPoint entryPoint, EntryPointNode entryPointNode, AbstractWorkingMemory wm)
           
NamedEntryPoint(EntryPoint entryPoint, EntryPointNode entryPointNode, AbstractWorkingMemory wm, ReentrantLock lock)
           
 
Method Summary
protected  void addPropertyChangeListener(Object object)
           
 EntryPoint getEntryPoint()
           
 String getEntryPointId()
           
 EntryPointNode getEntryPointNode()
           
 long getFactCount()
           
 FactHandle getFactHandle(Object object)
           
 FactHandle getFactHandleByIdentity(Object object)
           
<T extends org.drools.runtime.rule.FactHandle>
Collection<T>
getFactHandles()
           
<T extends org.drools.runtime.rule.FactHandle>
Collection<T>
getFactHandles(org.drools.runtime.ObjectFilter filter)
           
 InternalWorkingMemory getInternalWorkingMemory()
           
 Object getObject(org.drools.runtime.rule.FactHandle factHandle)
           
 Collection<Object> getObjects()
           
 Collection<Object> getObjects(org.drools.runtime.ObjectFilter filter)
           
 ObjectStore getObjectStore()
           
 ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry()
           
 RuleBase getRuleBase()
           
 WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)
           
 void insert(InternalFactHandle handle, Object object, Rule rule, Activation activation, ObjectTypeConf typeConf)
           
 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.
protected  FactHandle insert(Object object, boolean dynamic, boolean logical, Rule rule, Activation activation)
           
 void propertyChange(PropertyChangeEvent event)
           
protected  void removePropertyChangeListener(FactHandle handle)
           
 void reset()
           
 void retract(org.drools.runtime.rule.FactHandle handle)
          Retract a fact.
 void retract(FactHandle factHandle, boolean removeLogical, boolean updateEqualsMap, Rule rule, Activation activation)
           
 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.
 void update(org.drools.runtime.rule.FactHandle factHandle, Object object, Rule rule, Activation activation)
           
 void update(FactHandle factHandle, Object object, Rule rule, Activation activation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES

protected static final Class[] ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES

addRemovePropertyChangeListenerArgs

protected final Object[] addRemovePropertyChangeListenerArgs
The arguments used when adding/removing a property change listener.


objectStore

protected ObjectStore objectStore

ruleBase

protected transient InternalRuleBase ruleBase

entryPoint

protected EntryPoint entryPoint

entryPointNode

protected EntryPointNode entryPointNode

lock

protected final ReentrantLock lock
Constructor Detail

NamedEntryPoint

public NamedEntryPoint(EntryPoint entryPoint,
                       EntryPointNode entryPointNode,
                       AbstractWorkingMemory wm)

NamedEntryPoint

public NamedEntryPoint(EntryPoint entryPoint,
                       EntryPointNode entryPointNode,
                       AbstractWorkingMemory wm,
                       ReentrantLock lock)
Method Detail

reset

public void reset()
Specified by:
reset in interface InternalWorkingMemoryEntryPoint

getObjectStore

public ObjectStore getObjectStore()
Specified by:
getObjectStore in interface InternalWorkingMemoryEntryPoint

getEntryPointNode

public EntryPointNode getEntryPointNode()
Specified by:
getEntryPointNode in interface InternalWorkingMemoryEntryPoint

insert

public FactHandle insert(Object object)
                  throws FactException
Description copied from interface: WorkingMemoryEntryPoint
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.
See Also:
WorkingMemory

insert

public FactHandle insert(Object object,
                         boolean dynamic)
                  throws FactException
Description copied from interface: WorkingMemoryEntryPoint
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.

insert

protected FactHandle insert(Object object,
                            boolean dynamic,
                            boolean logical,
                            Rule rule,
                            Activation activation)
                     throws FactException
Throws:
FactException

insert

public void insert(InternalFactHandle handle,
                   Object object,
                   Rule rule,
                   Activation activation,
                   ObjectTypeConf typeConf)

update

public void update(org.drools.runtime.rule.FactHandle handle,
                   Object object)
            throws FactException
Description copied from interface: WorkingMemoryEntryPoint
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.

update

public void update(org.drools.runtime.rule.FactHandle factHandle,
                   Object object,
                   Rule rule,
                   Activation activation)
            throws FactException
Specified by:
update in interface InternalWorkingMemoryEntryPoint
Throws:
FactException

update

public void update(FactHandle factHandle,
                   Object object,
                   Rule rule,
                   Activation activation)
            throws FactException
Throws:
FactException

retract

public void retract(org.drools.runtime.rule.FactHandle handle)
             throws FactException
Description copied from interface: WorkingMemoryEntryPoint
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.

retract

public void retract(FactHandle factHandle,
                    boolean removeLogical,
                    boolean updateEqualsMap,
                    Rule rule,
                    Activation activation)
             throws FactException
Specified by:
retract in interface InternalWorkingMemoryEntryPoint
Throws:
FactException

addPropertyChangeListener

protected void addPropertyChangeListener(Object object)

removePropertyChangeListener

protected void removePropertyChangeListener(FactHandle handle)

getWorkingMemoryEntryPoint

public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name)

getObjectTypeConfigurationRegistry

public ObjectTypeConfigurationRegistry getObjectTypeConfigurationRegistry()
Specified by:
getObjectTypeConfigurationRegistry in interface InternalWorkingMemoryEntryPoint

getRuleBase

public RuleBase getRuleBase()
Specified by:
getRuleBase in interface InternalWorkingMemoryEntryPoint

getFactHandle

public FactHandle getFactHandle(Object object)
Specified by:
getFactHandle in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getEntryPoint

public EntryPoint getEntryPoint()
Specified by:
getEntryPoint in interface InternalWorkingMemoryEntryPoint

getInternalWorkingMemory

public InternalWorkingMemory getInternalWorkingMemory()
Specified by:
getInternalWorkingMemory in interface InternalWorkingMemoryEntryPoint

getFactHandleByIdentity

public FactHandle getFactHandleByIdentity(Object object)
Specified by:
getFactHandleByIdentity in interface InternalWorkingMemoryEntryPoint

getObject

public Object getObject(org.drools.runtime.rule.FactHandle factHandle)
Specified by:
getObject in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getFactHandles

public <T extends org.drools.runtime.rule.FactHandle> Collection<T> getFactHandles()
Specified by:
getFactHandles in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getFactHandles

public <T extends org.drools.runtime.rule.FactHandle> Collection<T> getFactHandles(org.drools.runtime.ObjectFilter filter)
Specified by:
getFactHandles in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getObjects

public Collection<Object> getObjects()
Specified by:
getObjects in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getObjects

public Collection<Object> getObjects(org.drools.runtime.ObjectFilter filter)
Specified by:
getObjects in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getEntryPointId

public String getEntryPointId()
Specified by:
getEntryPointId in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

getFactCount

public long getFactCount()
Specified by:
getFactCount in interface org.drools.runtime.rule.WorkingMemoryEntryPoint

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener


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