Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • ServiceCallContext -  immutable user parameter map that will can be implicitly passed to the service (and interceptor) on every method call.

    Code Block
    languagejava
    themeRDark
    titleServiceCallContext.java
    collapsetrue
    public interface ServiceCallContext {
        public String attribute(String name);
    
        public byte[] binaryAttribute(String name);
    }


  • ServiceCallInterceptor  - intercepts service method calls.

    Code Block
    languagejava
    themeRDark
    titleServiceCallInterceptor.java
    collapsetrue
    public interface ServiceCallInterceptor extends Serializable {
        // Called BEFORE the service method is executed.
        public default void onInvoke(String mtd, Object[] args, ServiceContext ctx) throws ServiceInterceptException {
            // No-op.
        }
    
        // Called AFTER the service method is executed.
        public default void onComplete(String mtd, Object[] args, @Nullable Object res, ServiceContext ctx) throws ServiceInterceptException {
            // No-op.
        }
    
        // Called when onInvoke, onComplete or service method throws an exception.
        public default void onError(String mtd, Object[] args, Throwable err, ServiceContext ctx) {
            // No-op.
        }
    }


  • ServiceInterceptException - unchecked exception that is used to highlight the exception that occurred during method interception (not execution).

...