|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log.output.AbstractTarget org.apache.log.output.db.AbstractJDBCTarget
Abstract JDBC target.
Constructor Summary | |
protected |
AbstractJDBCTarget(javax.sql.DataSource dataSource)
Creation of a new instance of the AbstractJDBCTarget. |
Method Summary | |
protected void |
checkConnection()
Utility method to check connection and bring it back up if necessary. |
void |
close()
Shutdown target. |
protected void |
closeConnection()
Close connection to underlying database. |
protected void |
doProcessEvent(LogEvent event)
Process a log event, via formatting and outputting it. |
protected java.sql.Connection |
getConnection()
Utility method for subclasses to access connection. |
protected boolean |
isStale()
Detect if connection is stale and should be reopened. |
protected void |
open()
Startup log session. |
protected void |
openConnection()
Open connection to underlying database. |
protected abstract void |
output(LogEvent event)
Output a log event to DB. |
Methods inherited from class org.apache.log.output.AbstractTarget |
getErrorHandler, isOpen, processEvent, setErrorHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractJDBCTarget(javax.sql.DataSource dataSource)
dataSource
- the JDBC datasourceMethod Detail |
protected void doProcessEvent(LogEvent event) throws java.lang.Exception
doProcessEvent
in class AbstractTarget
event
- the log event
java.lang.Exception
- if an event processing error occursprotected abstract void output(LogEvent event)
event
- the log event.protected void open()
open
in class AbstractTarget
protected void openConnection()
protected final java.sql.Connection getConnection()
protected final void checkConnection()
protected boolean isStale()
public void close()
close
in interface Closeable
close
in class AbstractTarget
protected void closeConnection()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |