Class DecouplingInterceptor
java.lang.Object
jadex.providedservice.impl.service.interceptors.AbstractMultiInterceptor
jadex.providedservice.impl.service.interceptors.DecouplingInterceptor
- All Implemented Interfaces:
IServiceInvocationInterceptor
Invocation interceptor for executing a call on
the underlying component thread.
It checks whether the call can be decoupled (has void or IFuture return type)
and the invoking thread is not already the component thread.
todo: what about synchronous calls that change the object state.
These calls could damage the service state.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Copy return value, when service call is finished.static class
Service invocation step. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
The argument copy allowed flag.protected jadex.common.IFilter
The clone filter (facade for marshal).protected jadex.core.impl.Component
The internal access.static final Map
The reference method cache (method -> boolean[] (is reference)).The static set of no decoupling methods.protected boolean
Is the interceptor for a required service proxy?protected static final Map
<Method, IServiceInvocationInterceptor> The static map of subinterceptors (method -> interceptor). -
Constructor Summary
ConstructorsConstructorDescriptionDecouplingInterceptor
(jadex.core.impl.Component ia, boolean copy, boolean required) Create a new invocation handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
Copy a value, if necessary.jadex.future.IFuture
<Void> Execute the command.Get a sub interceptor for special cases.static Map
<Method, IServiceInvocationInterceptor> Get the sub interceptors for special cases.static boolean[]
getReferenceInfo
(Method method, boolean refdef, boolean local) Get the copy info for method parameters.final jadex.serialization.ISerializationServices
Gets the serialization services.Methods inherited from class jadex.providedservice.impl.service.interceptors.AbstractMultiInterceptor
execute, isApplicable
-
Field Details
-
SUBINTERCEPTORS
The static map of subinterceptors (method -> interceptor). -
NO_DECOUPLING
The static set of no decoupling methods. -
methodreferences
The reference method cache (method -> boolean[] (is reference)). -
ia
protected jadex.core.impl.Component iaThe internal access. -
required
protected boolean requiredIs the interceptor for a required service proxy? -
copy
protected boolean copyThe argument copy allowed flag. -
filter
protected jadex.common.IFilter filterThe clone filter (facade for marshal).
-
-
Constructor Details
-
DecouplingInterceptor
public DecouplingInterceptor(jadex.core.impl.Component ia, boolean copy, boolean required) Create a new invocation handler.
-
-
Method Details
-
doExecute
Execute the command.- Specified by:
doExecute
in classAbstractMultiInterceptor
- Parameters:
args
- The argument(s) for the call.- Returns:
- The result of the command.
-
getInterceptor
Get a sub interceptor for special cases.- Overrides:
getInterceptor
in classAbstractMultiInterceptor
- Parameters:
sic
- The context.- Returns:
- The interceptor (if any).
-
doCopy
Copy a value, if necessary. -
getInterceptors
Get the sub interceptors for special cases. -
getSerializationServices
public final jadex.serialization.ISerializationServices getSerializationServices()Gets the serialization services.- Parameters:
platform
- The platform ID.- Returns:
- The serialization services.
-
getReferenceInfo
Get the copy info for method parameters.
-