Module bus.http

Interface Preprocessor

All Known Implementing Classes:
Httpv.SerialPreprocessor

public interface Preprocessor
An interface for a preprocessor that executes before an HTTP request is sent. Preprocessors can operate asynchronously and are ideal for tasks like adding authentication tokens, modifying headers, or logging requests.
Since:
Java 17+
Author:
Kimi Liu
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents a chain of preprocessors.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Performs the preprocessing logic.
  • Method Details

    • doProcess

      void doProcess(Preprocessor.PreChain chain)
      Performs the preprocessing logic. After processing, Preprocessor.PreChain.proceed() must be called to continue the request execution, unless the request is to be intentionally blocked.
      Parameters:
      chain - The processing chain, which provides context and a way to continue the request.