Class Invocation.Build<T>

    • Constructor Detail

    • Method Detail

      • result

        public void result​(Object result)
        Description copied from interface: Invocation
        Set the result that will be returned to the caller.

        This will replace a prior result set by calling #invoke or can be used to provide a result allowing to skip calling #invoke altogether.

        Specified by:
        result in interface Invocation
        Parameters:
        result - The result that will be returned to the caller.
      • finalResult

        public T finalResult()
        Return the final invocation result.
      • instance

        public Object instance()
        Description copied from interface: Invocation
        Return the 'this' instance of the invocation.

        This is typically used when invoking fallback/recovery methods.

        Specified by:
        instance in interface Invocation
      • wrap

        public abstract Invocation.Build<Twrap​(MethodInterceptor methodInterceptor)
        Wrap this invocation using a methodInterceptor returning the wrapped call.

        This invocation is effectively nested inside the returned invocation.

        Parameters:
        methodInterceptor - The method interceptor to use to wrap this call with
        Returns:
        The wrapped call