Package io.github.cfraser.proxi
Interface Interceptor
-
- All Implemented Interfaces:
public interface InterceptorInterceptor intercepts a proxy request and the corresponding response. The interception of mutable Request and Response enables the dynamic transformation of proxied data.
An Interceptor instance may intercept requests and responses concurrently. If the Interceptor implementation is not stateless, then synchronization is required.
-
-
Method Summary
Modifier and Type Method Description Booleaninterceptable(Request request)Determine whether the request should be intercepted by thisInterceptor.Unitintercept(Request request)Intercept the request before it is executed. Unitintercept(Response response)Intercept the response after it is received. ProxiergetProxier()-
-
Method Detail
-
interceptable
Boolean interceptable(Request request)
Determine whether the request should be intercepted by
thisInterceptor.- Parameters:
request- the proxy Request capable of being intercepted
-
intercept
Unit intercept(Request request)
Intercept the request before it is executed.
- Parameters:
request- the intercepted Request
-
intercept
Unit intercept(Response response)
Intercept the response after it is received.
- Parameters:
response- the intercepted Response
-
getProxier
Proxier getProxier()
-
-
-
-