Class ConnectionSourceBase

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.db.ConnectionSourceBase
All Implemented Interfaces:
ConnectionSource, ContextAware, LifeCycle
Direct Known Subclasses:
DataSourceConnectionSource, DriverManagerConnectionSource, JNDIConnectionSource

public abstract class ConnectionSourceBase extends ContextAwareBase implements ConnectionSource
Author:
Ceki Gülcü
  • Constructor Details

    • ConnectionSourceBase

      public ConnectionSourceBase()
  • Method Details

    • discoverConnectionProperties

      public void discoverConnectionProperties()
      Learn relevant information about this connection source.
    • supportsGetGeneratedKeys

      public final boolean supportsGetGeneratedKeys()
      Does this connection support the JDBC Connection.getGeneratedKeys method?
      Specified by:
      supportsGetGeneratedKeys in interface ConnectionSource
    • getSQLDialectCode

      public final SQLDialectCode getSQLDialectCode()
      Description copied from interface: ConnectionSource
      Get the SQL dialect that should be used for this connection. Note that the dialect is not needed if the JDBC driver supports the getGeneratedKeys method.
      Specified by:
      getSQLDialectCode in interface ConnectionSource
    • getPassword

      public final String getPassword()
      Get the password for this connection source.
    • setPassword

      public final void setPassword(String password)
      Sets the password.
      Parameters:
      password - The password to set
    • getUser

      public final String getUser()
      Get the user for this connection source.
    • setUser

      public final void setUser(String username)
      Sets the username.
      Parameters:
      username - The username to set
    • supportsBatchUpdates

      public final boolean supportsBatchUpdates()
      Does this connection support batch updates?
      Specified by:
      supportsBatchUpdates in interface ConnectionSource
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface LifeCycle
    • start

      public void start()
      Specified by:
      start in interface LifeCycle
    • stop

      public void stop()
      Specified by:
      stop in interface LifeCycle