org.apache.log4j.receivers.db

## Class DBReceiver

- java.lang.Object
- - org.apache.log4j.component.spi.ComponentBase
  - - org.apache.log4j.component.plugins.PluginSkeleton
    - - org.apache.log4j.component.plugins.Receiver
      - - org.apache.log4j.receivers.db.DBReceiver

- All Implemented Interfaces:
    Pauseable, Plugin, Component, Thresholdable, org.apache.log4j.spi.OptionHandler, org.apache.log4j.xml.UnrecognizedElementHandler

      public class DBReceiver
      extends Receiver
      implements Pauseable, org.apache.log4j.xml.UnrecognizedElementHandler

  Author:
    Scott Deboy , Ceki Gülcü

- - ### Field Summary

    - ### Fields inherited from class org.apache.log4j.component.plugins.Receiver

      `thresholdLevel`

    - ### Fields inherited from class org.apache.log4j.component.plugins.PluginSkeleton

      `active, name`

    - ### Fields inherited from class org.apache.log4j.component.spi.ComponentBase

      `repository`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBReceiver()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateOptions()`
    `ConnectionSource` | `getConnectionSource()`
    `int` | `getRefreshMillis()`
    `boolean` | `isPaused()` Get paused state.
    `boolean` | `parseUnrecognizedElement(Element element, Properties props)`
    `void` | `setConnectionSource(ConnectionSource connectionSource)`
    `void` | `setPaused(boolean paused)` Set paused state.
    `void` | `setRefreshMillis(int refreshMillis)`
    `void` | `shutdown()` Call when the plugin should be stopped.

    - ### Methods inherited from class org.apache.log4j.component.plugins.Receiver

      `doPost, getThreshold, isAsSevereAsThreshold, setThreshold`

    - ### Methods inherited from class org.apache.log4j.component.plugins.PluginSkeleton

      `addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, isActive, isEquivalent, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName`

    - ### Methods inherited from class org.apache.log4j.component.spi.ComponentBase

      `getLogger, getNonFloodingLogger, resetErrorCount`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DBReceiver

          public DBReceiver()

  - ### Method Detail

    - #### activateOptions

          public void activateOptions()

      Specified by:
        `activateOptions` in interface `org.apache.log4j.spi.OptionHandler`

    - #### setRefreshMillis

          public void setRefreshMillis(int refreshMillis)

    - #### getRefreshMillis

          public int getRefreshMillis()

    - #### getConnectionSource

          public ConnectionSource getConnectionSource()

      Returns:
        Returns the connectionSource.

    - #### setConnectionSource

          public void setConnectionSource(ConnectionSource connectionSource)

      Parameters:
        `connectionSource` - The connectionSource to set.

    - #### shutdown

          public void shutdown()

      Description copied from interface: `Plugin`
      Call when the plugin should be stopped.
      Specified by:
        `shutdown` in interface `Plugin`

    - #### setPaused

          public void setPaused(boolean paused)

      Description copied from interface: `Pauseable`
      Set paused state.
      Specified by:
        `setPaused` in interface `Pauseable`
      Parameters:
        `paused` - new value

    - #### isPaused

          public boolean isPaused()

      Description copied from interface: `Pauseable`
      Get paused state.
      Specified by:
        `isPaused` in interface `Pauseable`
      Returns:
        paused state.

    - #### parseUnrecognizedElement

          public boolean parseUnrecognizedElement(Element element,
                                         Properties props)
                                           throws Exception

      Specified by:
        `parseUnrecognizedElement` in interface `org.apache.log4j.xml.UnrecognizedElementHandler`
      Throws:
        `Exception`

Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.