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
  • Constructor Details

    • StatisticsJDBCInterceptor

      public StatisticsJDBCInterceptor()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • init

      public void init()
      Description copied from class: AbstractInterceptor
      Called after parsing is complete and this has been added to the object tree (whose root is Router).
      Overrides:
      init in class AbstractInterceptor
    • handleResponse

      public Outcome handleResponse(Exchange exc) throws Exception
      Specified by:
      handleResponse in interface Interceptor
      Overrides:
      handleResponse in class AbstractInterceptor
      Throws:
      Exception
    • getDataSource

      public DataSource getDataSource()
    • setDataSource

      public void setDataSource(DataSource dataSource)
      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

      public String getDataSourceBeanId()
    • setDataSourceBeanId

      @Deprecated public void setDataSourceBeanId(String dataSourceBeanId)
      Deprecated.
      use setDataSource(DataSource) instead: Using setDataSourceBeanId(String) from Spring works, but does not create a Spring bean dependency.