站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

WorkingMemoryLogger - JBoss RULES 3.0.6 API 英文版文档


org.drools.audit
Class WorkingMemoryLogger

java.lang.Object
  extended by org.drools.audit.WorkingMemoryLogger
All Implemented Interfaces:
java.util.EventListener, AgendaEventListener, WorkingMemoryEventListener
Direct Known Subclasses:
WorkingMemoryFileLogger

public abstract class WorkingMemoryLogger
extends java.lang.Object
implements WorkingMemoryEventListener, AgendaEventListener

A logger of events generated by a working memory. It listens to the events generated by the working memory and creates associated log event (containing a snapshot of the state of the working event at that time). Filters can be used to filter out unwanted events. Subclasses of this class should implement the logEventCreated(LogEvent) method and store this information, like for example log to file or database.


Constructor Summary
WorkingMemoryLogger(WorkingMemory workingMemory)
          Creates a new working memory logger for the given working memory.
 
Method Summary
 void activationCancelled(ActivationCancelledEvent event)
           
 void activationCreated(ActivationCreatedEvent event)
           
 void addFilter(ILogEventFilter filter)
          Adds the given filter to the list of filters for this event log.
 void afterActivationFired(AfterActivationFiredEvent event)
           
 void beforeActivationFired(BeforeActivationFiredEvent event)
           
 void clearFilters()
          Clears all filters of this event log.
abstract  void logEventCreated(LogEvent logEvent)
          This method is invoked every time a new log event is created.
 void objectAsserted(ObjectAssertedEvent event)
           
 void objectModified(ObjectModifiedEvent event)
           
 void objectRetracted(ObjectRetractedEvent event)
           
 void removeFilter(ILogEventFilter filter)
          Removes the given filter from the list of filters for this event log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkingMemoryLogger

public WorkingMemoryLogger(WorkingMemory workingMemory)
Creates a new working memory logger for the given working memory.

Parameters:
workingMemory -
Method Detail

logEventCreated

public abstract void logEventCreated(LogEvent logEvent)
This method is invoked every time a new log event is created. Subclasses should implement this method and store the event, like for example log to a file or database.

Parameters:
logEvent -

addFilter

public void addFilter(ILogEventFilter filter)
Adds the given filter to the list of filters for this event log. A log event must be accepted by all the filters to be entered in the event log.

Parameters:
filter - The filter that should be added.

removeFilter

public void removeFilter(ILogEventFilter filter)
Removes the given filter from the list of filters for this event log. If the given filter was not a filter of this event log, nothing happens.

Parameters:
filter - The filter that should be removed.

clearFilters

public void clearFilters()
Clears all filters of this event log.


objectAsserted

public void objectAsserted(ObjectAssertedEvent event)
Specified by:
objectAsserted in interface WorkingMemoryEventListener
See Also:
WorkingMemoryEventListener

objectModified

public void objectModified(ObjectModifiedEvent event)
Specified by:
objectModified in interface WorkingMemoryEventListener
See Also:
WorkingMemoryEventListener

objectRetracted

public void objectRetracted(ObjectRetractedEvent event)
Specified by:
objectRetracted in interface WorkingMemoryEventListener
See Also:
WorkingMemoryEventListener

activationCreated

public void activationCreated(ActivationCreatedEvent event)
Specified by:
activationCreated in interface AgendaEventListener
See Also:
AgendaEventListener

activationCancelled

public void activationCancelled(ActivationCancelledEvent event)
Specified by:
activationCancelled in interface AgendaEventListener
See Also:
AgendaEventListener

beforeActivationFired

public void beforeActivationFired(BeforeActivationFiredEvent event)
Specified by:
beforeActivationFired in interface AgendaEventListener
See Also:
AgendaEventListener

afterActivationFired

public void afterActivationFired(AfterActivationFiredEvent event)
Specified by:
afterActivationFired in interface AgendaEventListener
See Also:
AgendaEventListener