Package org.drools.kiesession.audit
Class WorkingMemoryLogger
java.lang.Object
org.drools.kiesession.audit.WorkingMemoryLogger
- All Implemented Interfaces:
EventListener,KieBaseEventListener,ProcessEventListener,AgendaEventListener,RuleRuntimeEventListener
- Direct Known Subclasses:
WorkingMemoryConsoleLogger,WorkingMemoryFileLogger
public abstract class WorkingMemoryLogger
extends Object
implements RuleRuntimeEventListener, AgendaEventListener, ProcessEventListener, KieBaseEventListener
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
ConstructorsConstructorDescriptionWorkingMemoryLogger(WorkingMemory workingMemory) Creates a new working memory logger for the given working memory. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFilter(ILogEventFilter filter) Adds the given filter to the list of filters for this event log.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidClears all filters of this event log.abstract voidlogEventCreated(LogEvent logEvent) This method is invoked every time a new log event is created.voidvoidmatchCreated(MatchCreatedEvent event) voidobjectDeleted(ObjectDeletedEvent event) voidvoidobjectUpdated(ObjectUpdatedEvent event) voidvoidremoveFilter(ILogEventFilter filter) Removes the given filter from the list of filters for this event log.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kie.api.event.process.ProcessEventListener
afterSLAViolated, beforeSLAViolated, onError, onMessage, onMigration, onSignal
-
Constructor Details
-
WorkingMemoryLogger
public WorkingMemoryLogger() -
WorkingMemoryLogger
Creates a new working memory logger for the given working memory.- Parameters:
workingMemory-
-
WorkingMemoryLogger
-
-
Method Details
-
readExternal
- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Throws:
IOException
-
logEventCreated
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
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
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. -
objectInserted
- Specified by:
objectInsertedin interfaceRuleRuntimeEventListener- See Also:
-
objectUpdated
- Specified by:
objectUpdatedin interfaceRuleRuntimeEventListener- See Also:
-
objectDeleted
- Specified by:
objectDeletedin interfaceRuleRuntimeEventListener- See Also:
-
matchCreated
- Specified by:
matchCreatedin interfaceAgendaEventListener- See Also:
-
matchCancelled
- Specified by:
matchCancelledin interfaceAgendaEventListener- See Also:
-
beforeMatchFired
- Specified by:
beforeMatchFiredin interfaceAgendaEventListener- See Also:
-
afterMatchFired
- Specified by:
afterMatchFiredin interfaceAgendaEventListener- See Also:
-
agendaGroupPopped
- Specified by:
agendaGroupPoppedin interfaceAgendaEventListener
-
agendaGroupPushed
- Specified by:
agendaGroupPushedin interfaceAgendaEventListener
-
beforeRuleFlowGroupActivated
- Specified by:
beforeRuleFlowGroupActivatedin interfaceAgendaEventListener
-
afterRuleFlowGroupActivated
- Specified by:
afterRuleFlowGroupActivatedin interfaceAgendaEventListener
-
beforeRuleFlowGroupDeactivated
- Specified by:
beforeRuleFlowGroupDeactivatedin interfaceAgendaEventListener
-
afterRuleFlowGroupDeactivated
- Specified by:
afterRuleFlowGroupDeactivatedin interfaceAgendaEventListener
-
beforeProcessStarted
- Specified by:
beforeProcessStartedin interfaceProcessEventListener
-
afterProcessStarted
- Specified by:
afterProcessStartedin interfaceProcessEventListener
-
beforeProcessCompleted
- Specified by:
beforeProcessCompletedin interfaceProcessEventListener
-
afterProcessCompleted
- Specified by:
afterProcessCompletedin interfaceProcessEventListener
-
beforeNodeTriggered
- Specified by:
beforeNodeTriggeredin interfaceProcessEventListener
-
afterNodeTriggered
- Specified by:
afterNodeTriggeredin interfaceProcessEventListener
-
beforeNodeLeft
- Specified by:
beforeNodeLeftin interfaceProcessEventListener
-
afterNodeLeft
- Specified by:
afterNodeLeftin interfaceProcessEventListener
-
beforeVariableChanged
- Specified by:
beforeVariableChangedin interfaceProcessEventListener
-
afterVariableChanged
- Specified by:
afterVariableChangedin interfaceProcessEventListener
-
afterKiePackageAdded
- Specified by:
afterKiePackageAddedin interfaceKieBaseEventListener
-
afterKiePackageRemoved
- Specified by:
afterKiePackageRemovedin interfaceKieBaseEventListener
-
beforeKieBaseLocked
- Specified by:
beforeKieBaseLockedin interfaceKieBaseEventListener
-
afterKieBaseLocked
- Specified by:
afterKieBaseLockedin interfaceKieBaseEventListener
-
beforeKieBaseUnlocked
- Specified by:
beforeKieBaseUnlockedin interfaceKieBaseEventListener
-
afterKieBaseUnlocked
- Specified by:
afterKieBaseUnlockedin interfaceKieBaseEventListener
-
afterRuleAdded
- Specified by:
afterRuleAddedin interfaceKieBaseEventListener
-
afterRuleRemoved
- Specified by:
afterRuleRemovedin interfaceKieBaseEventListener
-
beforeFunctionRemoved
- Specified by:
beforeFunctionRemovedin interfaceKieBaseEventListener
-
beforeKiePackageAdded
- Specified by:
beforeKiePackageAddedin interfaceKieBaseEventListener
-
beforeKiePackageRemoved
- Specified by:
beforeKiePackageRemovedin interfaceKieBaseEventListener
-
beforeRuleAdded
- Specified by:
beforeRuleAddedin interfaceKieBaseEventListener
-
beforeRuleRemoved
- Specified by:
beforeRuleRemovedin interfaceKieBaseEventListener
-
afterFunctionRemoved
- Specified by:
afterFunctionRemovedin interfaceKieBaseEventListener
-
beforeProcessAdded
- Specified by:
beforeProcessAddedin interfaceKieBaseEventListener
-
afterProcessAdded
- Specified by:
afterProcessAddedin interfaceKieBaseEventListener
-
beforeProcessRemoved
- Specified by:
beforeProcessRemovedin interfaceKieBaseEventListener
-
afterProcessRemoved
- Specified by:
afterProcessRemovedin interfaceKieBaseEventListener
-