Class ServiceInvocationContext


  • public class ServiceInvocationContext
    extends java.lang.Object
    Context for service invocations. Contains all method call information. Invariants that must hold before, during and after a service call for the NEXT/CUR/LAST service calls caller callee before next = null || user defined cur = actual call during next = null (set in ServiceInvocContext) cur = next cur = cur (same as in before) (set in MethodInvocationInterceptor) after next = null cur = cur (same as in before) last = next (set in MethodInvocationInterceptor)
    • Field Detail

      • PROFILING

        public static final boolean PROFILING
        Enable call profiling.
        See Also:
        Constant Field Values
      • PRINT_DELAY

        public static final long PRINT_DELAY
        Print every 10 seconds.
        See Also:
        Constant Field Values
      • calls

        protected static java.util.Map<IComponentIdentifier,​java.util.Map<java.lang.reflect.Method,​java.lang.Integer>> calls
        Service calls per method, calculated separately per platform.
      • proxy

        protected java.lang.Object proxy
        The origin (proxy object).
      • object

        protected java.util.List<java.lang.Object> object
        The object.
      • method

        protected java.util.List<java.lang.reflect.Method> method
        The method to be called.
      • arguments

        protected java.util.List<java.util.List<java.lang.Object>> arguments
        The invocation arguments.
      • result

        protected java.util.List<java.lang.Object> result
        The call result.
      • used

        protected java.util.List<java.lang.Integer> used
        The stack of used interceptors.
      • nextcall

        protected ServiceCall nextcall
        The next service call (will be current during call and last after call).
      • currentcall

        protected ServiceCall currentcall
        The current service call (to be reestablished after call).
    • Method Detail

      • getProxy

        public java.lang.Object getProxy()
        Get the proxy.
        Returns:
        The proxy.
      • setProxy

        public void setProxy​(java.lang.Object proxy)
        Set the proxy.
        Parameters:
        proxy - The proxy to set.
      • getObject

        public java.lang.Object getObject()
        Get the object.
        Returns:
        the object.
      • setObject

        public void setObject​(java.lang.Object object)
        Set the object.
        Parameters:
        object - The object to set.
      • getMethod

        public java.lang.reflect.Method getMethod()
        Get the method.
        Returns:
        the method.
      • setMethod

        public void setMethod​(java.lang.reflect.Method method)
        Set the method.
        Parameters:
        method - The method to set.
      • getArguments

        public java.util.List<java.lang.Object> getArguments()
        Get the args.
        Returns:
        the args.
      • getArgumentArray

        public java.lang.Object[] getArgumentArray()
        Get the args.
        Returns:
        the args.
      • setArguments

        public void setArguments​(java.util.List<java.lang.Object> args)
        Set the arguments.
        Parameters:
        args - The arguments to set.
      • getResult

        public java.lang.Object getResult()
        Get the result.
        Returns:
        the result.
      • setResult

        public void setResult​(java.lang.Object result)
        Set the result.
        Parameters:
        result - The result to set.
      • invoke

        public IFuture<java.lang.Void> invoke​(java.lang.Object object,
                                              java.lang.reflect.Method method,
                                              java.util.List<java.lang.Object> args)
        Invoke the next interceptor.
      • invoke

        public IFuture<java.lang.Void> invoke()
        Invoke the next interceptor.
      • push

        protected void push​(java.lang.Object o,
                            java.lang.reflect.Method m,
                            java.util.List<java.lang.Object> args,
                            java.lang.Object res)
        Push saves and copies the current set of values.
      • pop

        protected void pop()
        Pop delete the top most set of values.
      • isRemoteCall

        public boolean isRemoteCall()
        Test if a call is remote.
      • getTargetObject

        public java.lang.Object getTargetObject()
        Get the real target object. Returns domain service in case of service info.
      • toString

        public java.lang.String toString()
        String representation.
        Overrides:
        toString in class java.lang.Object
      • getNextServiceCall

        public ServiceCall getNextServiceCall()
        Get the service call.
        Returns:
        The service call.
      • getCurrentServiceCall

        public ServiceCall getCurrentServiceCall()
        Get the last service call.
        Returns:
        The last service call.
      • setNextCall

        public void setNextCall​(ServiceCall call)
        Set the lastcall.
        Parameters:
        currentcall - The lastcall to set.
      • getServiceIdentifier

        public IServiceIdentifier getServiceIdentifier()
        Get the service id.
      • setServiceIdentifier

        public void setServiceIdentifier​(IServiceIdentifier sid)
        Set the service id.