org.ow2.easybeans.component.audit
Class Auditor

java.lang.Object
  extended by org.ow2.easybeans.component.audit.Auditor
All Implemented Interfaces:
EZBEventListener, org.ow2.util.event.api.IEventListener

public class Auditor
extends java.lang.Object
implements EZBEventListener

This class listen to every event comming from its audited bean.

Author:
Mathieu ANCELIN

Constructor Summary
Auditor(java.lang.String filter, JMXNotifier jmxNotifier, InvocationAuditReportFactory invocationAuditReportFactory)
          The constructor of the auditor.
 
Method Summary
 boolean accept(org.ow2.util.event.api.IEvent event)
          Check whether the listener wants to handle this event.
 java.lang.String getEventProviderFilter()
          Get the event provider filter.
The event provider filter is a regular expression that define which event provider the listener needs to listen.
 org.ow2.util.auditreport.impl.LifeCycleAuditReport getLifeCycleAuditReport(EZBEventLifeCycle event, java.lang.String beanName, org.ow2.util.auditreport.impl.LifeCycleAuditReport.STEP step, java.lang.Thread current)
          This method return a new lifecycle audit report.
 org.ow2.util.event.api.EventPriority getPriority()
          Get the listener priority.
 void handle(org.ow2.util.event.api.IEvent event)
          The handle method of the listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Auditor

public Auditor(java.lang.String filter,
               JMXNotifier jmxNotifier,
               InvocationAuditReportFactory invocationAuditReportFactory)
The constructor of the auditor.

Parameters:
filter - the filter of the listener.
jmxNotifier - the given JMX notifier.
invocationAuditReportFactory - the given invocation audit factory
Method Detail

handle

public void handle(org.ow2.util.event.api.IEvent event)
The handle method of the listener. Called any time an event is received.

Specified by:
handle in interface org.ow2.util.event.api.IEventListener
Parameters:
event - the handled event.

getEventProviderFilter

public java.lang.String getEventProviderFilter()
Get the event provider filter.
The event provider filter is a regular expression that define which event provider the listener needs to listen.

Specified by:
getEventProviderFilter in interface EZBEventListener
Returns:
The event provider filter.

accept

public boolean accept(org.ow2.util.event.api.IEvent event)
Check whether the listener wants to handle this event.

Specified by:
accept in interface org.ow2.util.event.api.IEventListener
Parameters:
event - The event to check.
Returns:
True if the listener wants to handle this event, false otherwise.

getPriority

public org.ow2.util.event.api.EventPriority getPriority()
Get the listener priority.

Specified by:
getPriority in interface org.ow2.util.event.api.IEventListener
Returns:
The listener priority.

getLifeCycleAuditReport

public org.ow2.util.auditreport.impl.LifeCycleAuditReport getLifeCycleAuditReport(EZBEventLifeCycle event,
                                                                                  java.lang.String beanName,
                                                                                  org.ow2.util.auditreport.impl.LifeCycleAuditReport.STEP step,
                                                                                  java.lang.Thread current)
This method return a new lifecycle audit report.

Parameters:
event - the event used to generate the report.
beanName - the name of the concerned bean.
step - the step of the event in the lifecycle.
current - the current thread.
Returns:
the builded audit report.


Copyright © 2006-2010 OW2 Consortium. All Rights Reserved.