Class AbstractLRUApplicableInterceptor
- java.lang.Object
-
- jadex.bridge.service.component.interceptors.AbstractApplicableInterceptor
-
- jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
-
- jadex.bridge.service.component.interceptors.AbstractLRUApplicableInterceptor
-
- All Implemented Interfaces:
IServiceInvocationInterceptor
- Direct Known Subclasses:
AuthenticationInterceptor
,PrePostConditionInterceptor
public abstract class AbstractLRUApplicableInterceptor extends ComponentThreadInterceptor
Abstract interceptor class that uses a LRU for caching applicable states of invocations for subsequent calls. Should be used whenever isApplicable method is expensive.
-
-
Field Summary
Fields Modifier and Type Field Description protected LRU<java.lang.reflect.Method,java.lang.Boolean>
applicables
The LRU.-
Fields inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
ia
-
-
Constructor Summary
Constructors Constructor Description AbstractLRUApplicableInterceptor(IInternalAccess ia)
Create a new AbstractLRUApplicableInterceptor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
customIsApplicable(ServiceInvocationContext context)
Replacement method for isApplicable.boolean
isApplicable(ServiceInvocationContext context)
Test if the interceptor is applicable.-
Methods inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
getComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadex.bridge.service.component.IServiceInvocationInterceptor
execute
-
-
-
-
Field Detail
-
applicables
protected LRU<java.lang.reflect.Method,java.lang.Boolean> applicables
The LRU.
-
-
Constructor Detail
-
AbstractLRUApplicableInterceptor
public AbstractLRUApplicableInterceptor(IInternalAccess ia)
Create a new AbstractLRUApplicableInterceptor.
-
-
Method Detail
-
isApplicable
public final boolean isApplicable(ServiceInvocationContext context)
Test if the interceptor is applicable.- Specified by:
isApplicable
in interfaceIServiceInvocationInterceptor
- Overrides:
isApplicable
in classComponentThreadInterceptor
- Returns:
- True, if applicable.
-
customIsApplicable
public abstract boolean customIsApplicable(ServiceInvocationContext context)
Replacement method for isApplicable.
-
-