Interface SelectiveFilters

All Superinterfaces:
HttpFilters
All Known Implementing Classes:
HttpFiltersBuilder.Built

public interface SelectiveFilters extends HttpFilters
Filters that say which streams they inspect piece by piece.

Without this interface the proxy decides from the class: one that overrides clientToProxyRequest or proxyToServerRequest gets request bodies piece by piece, one that overrides serverToProxyResponse or proxyToClientResponse gets response bodies, one that overrides a WebSocket frame hook gets parsed frames, and one that overrides a WebSocket message hook gets joined messages. A class that overrides those hooks only to read heads would turn off the fast path for bodies it never looks at. Implementing this interface replaces the guess with an answer per instance: the proxy relays every stream sees(org.microproxy.HttpFiltersBuilder.Body) declines as raw bytes, and the hooks then receive only heads.

HttpFiltersBuilder.Built and HttpLogger's filters implement it.