org.jboss.aspects.logging
Class InvocationLogInterceptorFactory

java.lang.Object
  extended by org.jboss.aspects.logging.InvocationLogInterceptorFactory
All Implemented Interfaces:
AspectFactory

public class InvocationLogInterceptorFactory
extends Object
implements AspectFactory

Version:
$Revision: 37406 $
Author:
Adrian Brock.

Constructor Summary
InvocationLogInterceptorFactory()
           
 
Method Summary
 Object createPerClass(Advisor advisor)
          Creates an aspect with scope value Scope.PER_CLASS.
 Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
          Creates an aspect with scope value Scope.PER_INSTANCE.
 Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
          Creates an aspect with scope value or Scope.PER_JOINPOINT.
 Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
          Creates an aspect with scope value Scope.PER_CLASS_JOINPOINT or Scope.PER_JOINPOINT.
 Object createPerVM()
          Creates an aspect with scope value Scope.PER_VM.
 String getName()
          The name that identifies the aspect in its domain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvocationLogInterceptorFactory

public InvocationLogInterceptorFactory()
Method Detail

createPerVM

public Object createPerVM()
Description copied from interface: AspectFactory
Creates an aspect with scope value Scope.PER_VM.

Specified by:
createPerVM in interface AspectFactory
Returns:
the single aspect instance that will be invoked for all applicable joinpoints during Java VM execution. If null, the aspect represented by this factory is ignored, resulting in no interception.

createPerClass

public Object createPerClass(Advisor advisor)
Description copied from interface: AspectFactory
Creates an aspect with scope value Scope.PER_CLASS.

Specified by:
createPerClass in interface AspectFactory
Parameters:
advisor - manages all the interceptions that should occur during execution of a specific class
Returns:
the aspect instance that will be invoked for all applicable joinpoints contained in the class managed by advisor. If null, the aspect represented by this factory is ignored, resulting in no interception of the joinpoints contained in the referred class.
See Also:
Advisor.getClazz()

createPerInstance

public Object createPerInstance(Advisor advisor,
                                InstanceAdvisor instanceAdvisor)
Description copied from interface: AspectFactory
Creates an aspect with scope value Scope.PER_INSTANCE.

Specified by:
createPerInstance in interface AspectFactory
Parameters:
advisor - manages all the interceptions that should occur during execution of a specific class
instanceAdvisor - manages all the interceptions that should occur during execution of a specific instance. The instance it manages is an object of the class managed by advisor
Returns:
the aspect instance that will be invoked for all applicable joinpoints contained in the instance managed by instanceAdvisor. If null, the aspect represented by this factory is ignored, resulting in no interception of the joinpoints contained in the referred instance.
See Also:
Advisor.getClazz(), InstanceAdvisor.getInstance()

createPerJoinpoint

public Object createPerJoinpoint(Advisor advisor,
                                 Joinpoint jp)
Description copied from interface: AspectFactory
Creates an aspect with scope value Scope.PER_CLASS_JOINPOINT or Scope.PER_JOINPOINT.
In case the scope value is PER_CLASS_JOINPOINT, this method will always be invoked to create the aspect instance. On the other hand, if the scope value is PER_JOINPOINT, this method is called only if the joinpoint to be intercepted is in a static context (like a static method, a static field access, or a constructor execution).

Specified by:
createPerJoinpoint in interface AspectFactory
Parameters:
advisor - manages all the interceptions that should occur during execution of a specific class
jp - the joinpoint to be intercepted by the created instance. This joinpoint is contained in the class managed by advisor
Returns:
the aspect instance that will be invoked only to intercept jp. If null, the aspect represented by this factory is ignored, resulting in no interception of jp.
See Also:
Advisor.getClazz(), Joinpoint

createPerJoinpoint

public Object createPerJoinpoint(Advisor advisor,
                                 InstanceAdvisor instanceAdvisor,
                                 Joinpoint jp)
Description copied from interface: AspectFactory
Creates an aspect with scope value or Scope.PER_JOINPOINT.
This method is called only if the joinpoint to be intercepted is not in a static context (like a non-static method, for example).

Specified by:
createPerJoinpoint in interface AspectFactory
Parameters:
advisor - manages all the interceptions that should occur during execution of a specific class
instanceAdvisor - manages all the interceptions that should occur during execution of a specific instance. The instance it manages is an object of the class managed by advisor
jp - the joinpoint to be intercepted by the created instance. This joinpoint is contained in the class managed by advisor
Returns:
the aspect instance that will be invoked only to intercept jp when it happens on the instance managed by instanceAdvisor. If null, the aspect represented by this factory is ignored, resulting in no interception of jp when it is executed in the context of the referred instance.
See Also:
Advisor.getClazz(), InstanceAdvisor.getInstance(), Joinpoint

getName

public String getName()
Description copied from interface: AspectFactory
The name that identifies the aspect in its domain. Typically, the name is the name of the class.

Specified by:
getName in interface AspectFactory
Returns:
the name that identifies the aspect in its domain.
See Also:
Domain


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.