Class HTTPClientInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.HTTPClientInterceptor
- All Implemented Interfaces:
Interceptor
- Description
- The httpClient sends the request of an exchange to a Web Server using the HTTP protocol. Usually it will be globally used inside the transport. However, it is also possible to use it inside a proxy to give the proxy an individual configuration for its outgoing HTTP connection that is different from the global configuration in the transport.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleRequest(Exchange exc) voidbooleanbooleanvoidsetAdjustHostHeader(boolean adjustHostHeader) voidsetFailOverOn5XX(boolean failOverOn5XX) voidsetHttpClientConfig(HttpClientConfiguration httpClientConfig) Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, getShortDescription, handleAbort, handleResponse, init, setDisplayName, setFlow
-
Constructor Details
-
HTTPClientInterceptor
public HTTPClientInterceptor()
-
-
Method Details
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
init
- Specified by:
initin interfaceInterceptor- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
isFailOverOn5XX
public boolean isFailOverOn5XX() -
setFailOverOn5XX
public void setFailOverOn5XX(boolean failOverOn5XX) - Default
- false
- Description
- Whether to retry again (possibly the next node, when load balancing is active) after a HTTP status code 500<=x<600 was received.
-
isAdjustHostHeader
public boolean isAdjustHostHeader() -
setAdjustHostHeader
public void setAdjustHostHeader(boolean adjustHostHeader) - Default
- true
- Description
- Whether the HTTP "Host" header should be set before the response will be forwarded to its destination.
- Explanation
- Set this to false, if the incoming HTTP "Host" header should not be modified.
-
getHttpClientConfig
-
setHttpClientConfig
-