- 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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a chain of preprocessors. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoProcess(Preprocessor.PreChain chain) Performs the preprocessing logic.
-
Method Details
-
doProcess
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.
-