Interface ClientCallInterceptor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ClientCallInterceptor
Trusted host-installed dependency-call interceptor; application annotations never install it. The default preserves the existing one-attempt behavior. Implementations must not change caller authority or repeat an attempt after business entry without a separately defined durable protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    Wraps one logical call within its original total deadline.
    Returns the default interceptor that executes the supplied attempt exactly once.
    default void
    validate(Class<?> contract)
    Validates interface policy metadata before discovery or application construction.
  • Method Details

    • invoke

      Object invoke(ClientCall call, ClientAttempt attempt) throws Throwable
      Wraps one logical call within its original total deadline.
      Parameters:
      call - immutable identity and pinned target
      attempt - host-owned state and execution closure
      Returns:
      business result
      Throws:
      Throwable - the final call or policy failure
    • validate

      default void validate(Class<?> contract)
      Validates interface policy metadata before discovery or application construction.
      Parameters:
      contract - declared ordinary business interface
      Throws:
      IllegalArgumentException - for unsupported/conflicting policy metadata
    • singleAttempt

      static ClientCallInterceptor singleAttempt()
      Returns the default interceptor that executes the supplied attempt exactly once.
      Returns:
      stateless thread-safe single-attempt interceptor