org.jboss.aspects.logging
Class CallLoggingInterceptor
java.lang.Object
org.jboss.aspects.logging.CallLoggingInterceptor
- All Implemented Interfaces:
- Interceptor, LoggingConstants
public final class CallLoggingInterceptor
- extends Object
- implements Interceptor, LoggingConstants
Logs invocations.
- Version:
- $Revision: 37406 $
- Author:
- Adrian Brock.
Field Summary |
protected org.jboss.logging.Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.jboss.logging.Logger log
CallLoggingInterceptor
public CallLoggingInterceptor()
getName
public String getName()
- Description copied from interface:
Interceptor
- Returns the name of this interceptor. This name is unique inside the
domain
.
- Specified by:
getName
in interface Interceptor
- Returns:
- name the name that identifies this interceptor in its
domain
invoke
public Object invoke(Invocation invocation)
throws Throwable
- Description copied from interface:
Interceptor
- The single advice contained in the
Interceptor
.
To call the next interceptor or advice in the chain, this method must call
invocation.invokeNext()
method (if there are not elements left to
be called in the chain, this method invokes the joinpoint itself). Not doing
so means halting the execution of the interceptor chain and, hence, avoiding
the execution of the joinpoint. This should be done only when the
interceptor must replace the joinpoint execution.
- Specified by:
invoke
in interface Interceptor
- Parameters:
invocation
- represents the joinpoint to be intercepted
- Returns:
- the result value. This value will be returned to the previous
interceptor/advice as a result of
Invocation.invokeNext()
. In case this is the first
interceptor in the chain, this value will replace the
joinpoint return value in the basis system.
- Throws:
Throwable
- may throw any exceptions declared by the joinpoint itself.
If this exception is not declared and is not a runtime
exception, it will be encapsulated in a
RuntimeException
before being thrown to the basis
system.
dumpInvocation
public String dumpInvocation(Invocation invocation)
- Display useful information about the invocation
- Parameters:
invocation
- the invocation
dumpInvocationResponse
public String dumpInvocationResponse(Object response)
- Display useful information about the invocation response
- Parameters:
invocation
- the invocation
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.