Interface ConnectionSource
-
- All Known Implementing Classes:
DataSourceConnectionSource
,FactoryMethodConnectionSource
public interface ConnectionSource
Configuration element forJdbcAppender
. If you want to use theJdbcAppender
but none of the provided connection sources meet your needs, you can simply create your own connection source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.sql.Connection
getConnection()
This should return a new connection every time it is called.java.lang.String
toString()
All implementations must overrideObject.toString()
to provide information about the connection configuration (obscuring passwords with one-way hashes).
-
-
-
Method Detail
-
getConnection
java.sql.Connection getConnection() throws java.sql.SQLException
This should return a new connection every time it is called.- Returns:
- the SQL connection object.
- Throws:
java.sql.SQLException
- if a database error occurs.
-
toString
java.lang.String toString()
All implementations must overrideObject.toString()
to provide information about the connection configuration (obscuring passwords with one-way hashes).- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string representation of this connection source.
-
-