protected class SQLitePortal.ConnectionTask
extends java.lang.Object
implements java.lang.Runnable
SQLitePortal
to create a persistent connection to its
underlying database on a background thread.Modifier and Type | Field and Description |
---|---|
protected SQLitePortal |
m_dbh
A reference back to the
SQLitePortal that needs the
connection. |
protected SQLitePortal.ConnectionListener |
m_listener
A listener to handle the connection callback, if any.
|
Modifier | Constructor and Description |
---|---|
protected |
ConnectionTask()
The default constructor.
|
protected |
ConnectionTask(SQLitePortal.ConnectionListener l)
A constructor which specifies a listener to receive the "on
connected" callback.
|
Modifier and Type | Method and Description |
---|---|
void |
run() |
void |
runInBackground()
Executes the task in the background.
|
protected SQLitePortal m_dbh
SQLitePortal
that needs the
connection.protected SQLitePortal.ConnectionListener m_listener
protected ConnectionTask()
protected ConnectionTask(SQLitePortal.ConnectionListener l)
l
- a listenerpublic void runInBackground()
SQLitePortal
implementations should always use this method instead of
run()
.public void run()
run
in interface java.lang.Runnable