Class ExchangeStoreInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.ExchangeStoreInterceptor
- All Implemented Interfaces:
Interceptor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class ExchangeStoreInterceptor
extends AbstractInterceptor
implements org.springframework.context.ApplicationContextAware
- Description
- Adds the current state of HTTP requests and responses to an "exchange store".
- Explanation
- Note that depending on the implementation of the exchange store, both request *and* response logging might both be required for the exchange to be saved.
- Topic
- 5. Monitoring, Logging and Statistics
-
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 TypeMethodDescriptionprotected Outcomehandle(Exchange exc, Interceptor.Flow flow) voidhandleAbort(Exchange exc) Called when anyInterceptor.handleRequest(Exchange)orInterceptor.handleResponse(Exchange)later in the chain returnedOutcome.ABORTor threw an exception.handleRequest(Exchange exc) handleResponse(Exchange exc) voidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetExchangeStore(ExchangeStore exchangeStore) voidsetExchangeStoreBeanId(String exchangeStoreBeanId) Deprecated.Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, init, setDisplayName, setFlow
-
Constructor Details
-
ExchangeStoreInterceptor
public ExchangeStoreInterceptor() -
ExchangeStoreInterceptor
- Throws:
Exception
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
handleAbort
Description copied from interface:InterceptorCalled when anyInterceptor.handleRequest(Exchange)orInterceptor.handleResponse(Exchange)later in the chain returnedOutcome.ABORTor threw an exception.handleAbort is called in the reverse order of the chain (as handleResponse is).
- Specified by:
handleAbortin interfaceInterceptor- Overrides:
handleAbortin classAbstractInterceptor
-
handle
-
getExchangeStore
-
setExchangeStore
- Description
- Bean name of the exchange store defined as a spring bean.
- Example
- forgetfulExchangeStore
-
getExchangeStoreBeanId
-
setExchangeStoreBeanId
Deprecated.usesetExchangeStore(ExchangeStore)instead: UsingsetExchangeStoreBeanId(String)from Spring works, but does not create a Spring bean dependency. -
init
Description copied from class:AbstractInterceptorCalled after parsing is complete and this has been added to the object tree (whose root is Router).- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
setExchangeStore(ExchangeStore)instead: UsingsetExchangeStoreBeanId(String)from Spring works, but does not create a Spring bean dependency.