Interface Interceptor<T>

All Known Implementing Classes:
ComposableInterceptor

public interface Interceptor<T>
Intercepts a signal before it gets exported. The signal can get updated and/or filtered out based on each interceptor implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    intercept(T item)
    Intercepts a signal.
    default Collection<T>
    Intercepts a collection of signals.
  • Method Details

    • intercept

      @Nullable T intercept(T item)
      Intercepts a signal.
      Parameters:
      item - The signal object.
      Returns:
      The received signal modified (or null for excluding this signal from getting exported). If there's no operation needed to be done for a specific signal, it should be returned as is.
    • interceptAll

      default Collection<T> interceptAll(Collection<T> items)
      Intercepts a collection of signals.