org.mockejb.interceptor
Class AspectSystemFactory
java.lang.Object
org.mockejb.interceptor.AspectSystemFactory
- public class AspectSystemFactory
- extends java.lang.Object
Loads the class implementing AspectSystem and returns the object of this class
to the client. The class name is specified by the system property "interceptor.aspect.system".
If system property is not provided, returns the default factory AspectSystemImpl
provided by the framework.
- Author:
- Alexander Ananiev
Method Summary |
static AspectSystem |
getAspectSystem()
If system property "interceptor.aspect.system.thread" set to true,
returns AspectSystem instance which is stored in
a ThreadLocal variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASPECT_SYSTEM_PROPERTY
public static final java.lang.String ASPECT_SYSTEM_PROPERTY
- Name of the system property providing the name of the aspect system class
to use instead of the default
- See Also:
- Constant Field Values
THREAD_LOCAL_ASPECT_SYSTEM
public static final java.lang.String THREAD_LOCAL_ASPECT_SYSTEM
- See Also:
- Constant Field Values
AspectSystemFactory
public AspectSystemFactory()
getAspectSystem
public static AspectSystem getAspectSystem()
- If system property "interceptor.aspect.system.thread" set to true,
returns AspectSystem instance which is stored in
a ThreadLocal variable. This is convenient, for example,
if test classes can run concurrently and each needs to set its
own aspects .
Otherwise returns the singleton aspect system (always the same instance per JVM)
- Returns:
- AspectSystem