org.ow2.easybeans.component.audit.report
Class InvocationAuditReportFactory

java.lang.Object
  extended by org.ow2.easybeans.component.audit.report.InvocationAuditReportFactory

public final class InvocationAuditReportFactory
extends java.lang.Object

This class build report based on invocations events.

Author:
Mathieu ANCELIN

Constructor Summary
InvocationAuditReportFactory()
          The constructor of the factory.
 
Method Summary
protected static java.lang.StackTraceElement[] cleanupStackTrace(java.lang.StackTraceElement[] stackTrace)
          Cleanup the stack trace elements to ave the right stack.
 org.ow2.util.auditreport.impl.InvocationAuditReport getAuditReport(long stop, EZBEventBeanInvocationEnd event, java.lang.String providerId)
          Return a new report well endded.
 org.ow2.util.auditreport.impl.InvocationAuditReport getAuditReport(long stop, EZBEventBeanInvocationError event, java.lang.String providerId)
          Return a new report endded with an error.
 void prepareAuditReport(long start, java.lang.String method, java.lang.Thread current, EZBEventBeanInvocationBegin event, java.lang.String providerId, java.security.Principal[] callerRoles, java.security.Principal caller)
          This method create a minimal report with start informations and put it in a map, waiting for ending informations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationAuditReportFactory

public InvocationAuditReportFactory()
The constructor of the factory.

Method Detail

prepareAuditReport

public void prepareAuditReport(long start,
                               java.lang.String method,
                               java.lang.Thread current,
                               EZBEventBeanInvocationBegin event,
                               java.lang.String providerId,
                               java.security.Principal[] callerRoles,
                               java.security.Principal caller)
This method create a minimal report with start informations and put it in a map, waiting for ending informations.

Parameters:
start - the time (in ns) the invocation starts.
method - the method requested.
current - the current thread.
event - the invocation event.
providerId - the provider name.
callerRoles - the roles used for the invocation.
caller - the caller identity

cleanupStackTrace

protected static java.lang.StackTraceElement[] cleanupStackTrace(java.lang.StackTraceElement[] stackTrace)
Cleanup the stack trace elements to ave the right stack.

Parameters:
stackTrace - the given stack
Returns:
the cleanup stack

getAuditReport

public org.ow2.util.auditreport.impl.InvocationAuditReport getAuditReport(long stop,
                                                                          EZBEventBeanInvocationEnd event,
                                                                          java.lang.String providerId)
Return a new report well endded.

Parameters:
stop - the time the event occured.
event - the end event.
providerId - the provider.
Returns:
a new report.

getAuditReport

public org.ow2.util.auditreport.impl.InvocationAuditReport getAuditReport(long stop,
                                                                          EZBEventBeanInvocationError event,
                                                                          java.lang.String providerId)
Return a new report endded with an error.

Parameters:
stop - the time the event occured.
event - the error event.
providerId - the provider.
Returns:
a new report.


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