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

WorkingMemoryLogger (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.audit
Class WorkingMemoryLogger

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

public abstract class WorkingMemoryLogger
extends 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.

Author:
Kris Verlaenen

Constructor Summary
WorkingMemoryLogger(WorkingMemory workingMemory)
          Creates a new working memory logger for the given working memory.
 
Method Summary
 void activationCancelled(ActivationCancelledEvent event, WorkingMemory workingMemory)
           
 void activationCreated(ActivationCreatedEvent event, WorkingMemory workingMemory)
           
 void addFilter(ILogEventFilter filter)
          Adds the given filter to the list of filters for this event log.
 void afterActivationFired(AfterActivationFiredEvent event, WorkingMemory workingMemory)
           
 void agendaGroupPopped(AgendaGroupPoppedEvent event, WorkingMemory workingMemory)
           
 void agendaGroupPushed(AgendaGroupPushedEvent event, WorkingMemory workingMemory)
           
 void beforeActivationFired(BeforeActivationFiredEvent event, WorkingMemory workingMemory)
           
 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,
                              WorkingMemory workingMemory)
Specified by:
activationCreated in interface AgendaEventListener
See Also:
AgendaEventListener

activationCancelled

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

beforeActivationFired

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

afterActivationFired

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

agendaGroupPopped

public void agendaGroupPopped(AgendaGroupPoppedEvent event,
                              WorkingMemory workingMemory)
Specified by:
agendaGroupPopped in interface AgendaEventListener

agendaGroupPushed

public void agendaGroupPushed(AgendaGroupPushedEvent event,
                              WorkingMemory workingMemory)
Specified by:
agendaGroupPushed in interface AgendaEventListener


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