Class ShadowingInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.shadowing.ShadowingInterceptor
- All Implemented Interfaces:
Interceptor
-
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 TypeMethodDescriptionvoidcloneRequestAndSend(AbstractBody completeBody, Exchange mainExchange, Header copiedHeader) handleRequest(Exchange exc) voidsetTargets(List<AbstractServiceProxy.Target> targets) Sets the list of shadow hosts to which requests will be cloned and sent.Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, handleAbort, handleResponse, init, init, setDisplayName, setFlow
-
Constructor Details
-
ShadowingInterceptor
public ShadowingInterceptor()
-
-
Method Details
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
cloneRequestAndSend
public void cloneRequestAndSend(AbstractBody completeBody, Exchange mainExchange, Header copiedHeader) -
setTargets
Sets the list of shadow hosts to which requests will be cloned and sent.Each target in the list represents a shadow host where the request will be forwarded. These shadow hosts are processed in the background, and if a response from any shadow host contains a 5XX status code, it will be logged.
- Parameters:
targets- a list ofAbstractServiceProxy.Targetobjects representing the shadow hosts.
-
getTargets
-