Class DecouplingInterceptor
- java.lang.Object
- 
- jadex.bridge.service.component.interceptors.AbstractMultiInterceptor
- 
- jadex.bridge.service.component.interceptors.DecouplingInterceptor
 
 
- 
- All Implemented Interfaces:
- IServiceInvocationInterceptor
 
 public class DecouplingInterceptor extends AbstractMultiInterceptor 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 SummaryNested Classes Modifier and Type Class Description protected classDecouplingInterceptor.CopyReturnValueResultListenerCopy return value, when service call is finished.static classDecouplingInterceptor.InvokeMethodStepService invocation step.
 - 
Field SummaryFields Modifier and Type Field Description protected booleancopyThe argument copy allowed flag.protected IExternalAccesseaThe external access.protected IFilterfilterThe clone filter (facade for marshal).protected IInternalAccessiaThe internal access.static java.util.MapmethodreferencesThe reference method cache (method -> boolean[] (is reference)).protected static java.util.Set<java.lang.reflect.Method>NO_DECOUPLINGThe static set of no decoupling methods.protected booleanrequiredIs the interceptor for a required service proxy?protected static java.util.Map<java.lang.reflect.Method,IServiceInvocationInterceptor>SUBINTERCEPTORSThe static map of subinterceptors (method -> interceptor).
 - 
Constructor SummaryConstructors Constructor Description DecouplingInterceptor(IInternalAccess ia, boolean copy, boolean required)Create a new invocation handler.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectdoCopy(boolean copy, IFilter deffilter, java.lang.Object value)Copy a value, if necessary.IFuture<java.lang.Void>doExecute(ServiceInvocationContext sic)Execute the command.IServiceInvocationInterceptorgetInterceptor(ServiceInvocationContext sic)Get a sub interceptor for special cases.static java.util.Map<java.lang.reflect.Method,IServiceInvocationInterceptor>getInterceptors()Get the sub interceptors for special cases.static boolean[]getReferenceInfo(java.lang.reflect.Method method, boolean refdef, boolean local)Get the copy info for method parameters.ISerializationServicesgetSerializationServices()Gets the serialization services.- 
Methods inherited from class jadex.bridge.service.component.interceptors.AbstractMultiInterceptorexecute, isApplicable
 
- 
 
- 
- 
- 
Field Detail- 
SUBINTERCEPTORSprotected static final java.util.Map<java.lang.reflect.Method,IServiceInvocationInterceptor> SUBINTERCEPTORS The static map of subinterceptors (method -> interceptor).
 - 
NO_DECOUPLINGprotected static final java.util.Set<java.lang.reflect.Method> NO_DECOUPLING The static set of no decoupling methods.
 - 
methodreferencespublic static final java.util.Map methodreferences The reference method cache (method -> boolean[] (is reference)).
 - 
eaprotected IExternalAccess ea The external access.
 - 
iaprotected IInternalAccess ia The internal access.
 - 
requiredprotected boolean required Is the interceptor for a required service proxy?
 - 
copyprotected boolean copy The argument copy allowed flag.
 - 
filterprotected IFilter filter The clone filter (facade for marshal).
 
- 
 - 
Constructor Detail- 
DecouplingInterceptorpublic DecouplingInterceptor(IInternalAccess ia, boolean copy, boolean required) Create a new invocation handler.
 
- 
 - 
Method Detail- 
doExecutepublic IFuture<java.lang.Void> doExecute(ServiceInvocationContext sic) Execute the command.- Specified by:
- doExecutein class- AbstractMultiInterceptor
- Parameters:
- args- The argument(s) for the call.
- Returns:
- The result of the command.
 
 - 
getInterceptorpublic IServiceInvocationInterceptor getInterceptor(ServiceInvocationContext sic) Get a sub interceptor for special cases.- Overrides:
- getInterceptorin class- AbstractMultiInterceptor
- Parameters:
- sic- The context.
- Returns:
- The interceptor (if any).
 
 - 
doCopyprotected java.lang.Object doCopy(boolean copy, IFilter deffilter, java.lang.Object value)Copy a value, if necessary.
 - 
getInterceptorspublic static java.util.Map<java.lang.reflect.Method,IServiceInvocationInterceptor> getInterceptors() Get the sub interceptors for special cases.
 - 
getSerializationServicespublic final ISerializationServices getSerializationServices() Gets the serialization services.- Parameters:
- platform- The platform ID.
- Returns:
- The serialization services.
 
 - 
getReferenceInfopublic static boolean[] getReferenceInfo(java.lang.reflect.Method method, boolean refdef, boolean local)Get the copy info for method parameters.
 
- 
 
-