public static final class TestOpenClose.MyDatabaseEventListener extends java.lang.Object implements DatabaseEventListener
STATE_BACKUP_FILE, STATE_CREATE_INDEX, STATE_RECONNECTED, STATE_RECOVER, STATE_SCAN_FILE, STATE_STATEMENT_END, STATE_STATEMENT_PROGRESS, STATE_STATEMENT_START| Constructor and Description |
|---|
MyDatabaseEventListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
closingDatabase()
This method is called before the database is closed normally.
|
void |
exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
This method is called if an exception occurred.
|
void |
init(java.lang.String url)
This method is called just after creating the object.
|
void |
opened()
This method is called after the database has been opened.
|
void |
setProgress(int state,
java.lang.String name,
int current,
int max)
This method is called for long running events, such as recovering,
scanning a file or building an index.
|
public void exceptionThrown(java.sql.SQLException e,
java.lang.String sql)
DatabaseEventListenerexceptionThrown in interface DatabaseEventListenere - the exceptionsql - the SQL statementpublic void setProgress(int state,
java.lang.String name,
int current,
int max)
DatabaseEventListenerMore states might be added in future versions, therefore implementations should silently ignore states that they don't understand.
setProgress in interface DatabaseEventListenerstate - the statename - the object namecurrent - the current positionmax - the highest possible value (might be 0)public void closingDatabase()
DatabaseEventListenerclosingDatabase in interface DatabaseEventListenerpublic void init(java.lang.String url)
DatabaseEventListenerinit in interface DatabaseEventListenerurl - - the database URLpublic void opened()
DatabaseEventListeneropened in interface DatabaseEventListener