Interface ServiceInterceptorContext

  • All Known Implementing Classes:
    ServiceInterceptorContextImpl

    public interface ServiceInterceptorContext
    A shared context between service interceptors
    • Method Detail

      • getAttribute

        Object getAttribute​(String name)
        Returns a contextual attribute by name
      • getAttributes

        Map<String,​Object> getAttributes()
        Returns the contextual attributes
      • getError

        Throwable getError()
        Returns the error for the service invocation
      • getParameters

        Object[] getParameters()
        Returns the invocation parameters
      • getResult

        Object getResult()
        Returns service invocation result
      • isSkipInvocation

        boolean isSkipInvocation()
        Returns whether the original service invocation should be skipped
      • isSuccess

        boolean isSuccess()
        Returns whether no error is present in the current invocation
      • setAttribute

        void setAttribute​(String name,
                          Object value)
        Sets a contextual attribute by name
      • setError

        void setError​(Throwable error)
        Sets the error for the service invocation
      • setParameter

        void setParameter​(int index,
                          Object value)
        Replaces an specific invocation parameter. The new parameter must match the corresponding service operation parameter type.
      • setParameters

        void setParameters​(Object[] newParams)
        Replaces all invocation parameters. The new parameters size must be the same as the service operation parameters, and each parameter must match the type.
      • setResult

        void setResult​(Object result)
        Sets the service invocation result
      • setSkipInvocation

        void setSkipInvocation​(boolean skipInvocation)
        Sets whether the original service invocation should be skipped
      • skipInvocation

        void skipInvocation()
        Marks to skip the actual service invocation. Use setResult(Object) to set what will be returned by the method