Class 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.
    • Field Detail

      • SUBINTERCEPTORS

        protected static final java.util.Map<java.lang.reflect.Method,​IServiceInvocationInterceptor> SUBINTERCEPTORS
        The static map of subinterceptors (method -> interceptor).
      • NO_DECOUPLING

        protected static final java.util.Set<java.lang.reflect.Method> NO_DECOUPLING
        The static set of no decoupling methods.
      • methodreferences

        public static final java.util.Map methodreferences
        The reference method cache (method -> boolean[] (is reference)).
      • required

        protected boolean required
        Is the interceptor for a required service proxy?
      • copy

        protected boolean copy
        The argument copy allowed flag.
      • filter

        protected IFilter filter
        The clone filter (facade for marshal).
    • Constructor Detail

      • DecouplingInterceptor

        public DecouplingInterceptor​(IInternalAccess ia,
                                     boolean copy,
                                     boolean required)
        Create a new invocation handler.
    • Method Detail

      • doCopy

        protected java.lang.Object doCopy​(boolean copy,
                                          IFilter deffilter,
                                          java.lang.Object value)
        Copy a value, if necessary.
      • getInterceptors

        public static java.util.Map<java.lang.reflect.Method,​IServiceInvocationInterceptor> getInterceptors()
        Get the sub interceptors for special cases.
      • getSerializationServices

        public final ISerializationServices getSerializationServices()
        Gets the serialization services.
        Parameters:
        platform - The platform ID.
        Returns:
        The serialization services.
      • getReferenceInfo

        public static boolean[] getReferenceInfo​(java.lang.reflect.Method method,
                                                 boolean refdef,
                                                 boolean local)
        Get the copy info for method parameters.