Class StatisticsJDBCInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.statistics.StatisticsJDBCInterceptor
- All Implemented Interfaces:
Interceptor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class StatisticsJDBCInterceptor
extends AbstractInterceptor
implements org.springframework.context.ApplicationContextAware
- Description
- Writes statistics (time, status code, hostname, URI, etc.) about exchanges passing through into a database (one row per exchange).
- 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 TypeMethodDescriptionhandleResponse(Exchange exc) voidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).booleanbooleanbooleanvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetCreateTable(boolean createTable) voidsetDataSource(DataSource dataSource) voidsetDataSourceBeanId(String dataSourceBeanId) Deprecated.voidsetPostMethodOnly(boolean postMethodOnly) voidsetSoapOnly(boolean soapOnly) Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, getShortDescription, handleAbort, handleRequest, init, setDisplayName, setFlow
-
Constructor Details
-
StatisticsJDBCInterceptor
public StatisticsJDBCInterceptor()
-
-
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
-
init
public void 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
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
getDataSource
-
setDataSource
- Description
- The spring bean ID of a data source bean.
-
isPostMethodOnly
public boolean isPostMethodOnly() -
setPostMethodOnly
public void setPostMethodOnly(boolean postMethodOnly) - Default
- false
-
isCreateTable
public boolean isCreateTable() -
setCreateTable
public void setCreateTable(boolean createTable) - Default
- true
- Description
- toggle to try automatic table creation or disable table creation altogether
-
isSoapOnly
public boolean isSoapOnly() -
setSoapOnly
public void setSoapOnly(boolean soapOnly) - Default
- false
-
getDataSourceBeanId
-
setDataSourceBeanId
Deprecated.usesetDataSource(DataSource)instead: Using setDataSourceBeanId(String) from Spring works, but does not create a Spring bean dependency.
-
setDataSource(DataSource)instead: Using setDataSourceBeanId(String) from Spring works, but does not create a Spring bean dependency.