android.content
public
abstract
class
android.content.AsyncQueryHandler
A helper class to help make handling asynchronous ContentResolver
queries easier.
Nested Classes
Summary
Public Constructors
Public Methods
|
|
final |
|
|
void |
cancelOperation(int token) |
|
|
|
|
|
void |
handleMessage(Message msg) |
|
|
final |
|
|
void |
startDelete(int token, Object cookie, Uri uri, String selection, String[] selectionArgs) |
|
|
final |
|
|
void |
startInsert(int token, Object cookie, Uri uri, ContentValues initialValues) |
|
|
|
|
|
void |
startQuery(int token, Object cookie, Uri uri, String[] projection, String selection, String[] selectionArgs, String orderBy) |
|
|
final |
|
|
void |
startUpdate(int token, Object cookie, Uri uri, ContentValues values, String selection, String[] selectionArgs) |
Protected Methods
dispatchMessage,
dump,
getLooper,
handleMessage,
hasMessages,
hasMessages,
obtainMessage,
obtainMessage,
obtainMessage,
obtainMessage,
obtainMessage,
post,
postAtFrontOfQueue,
postAtTime,
postAtTime,
postDelayed,
removeCallbacks,
removeCallbacks,
removeCallbacksAndMessages,
removeMessages,
removeMessages,
sendEmptyMessage,
sendEmptyMessageAtTime,
sendEmptyMessageDelayed,
sendMessage,
sendMessageAtFrontOfQueue,
sendMessageAtTime,
sendMessageDelayed,
toString
|
|
|
|
|
void |
dispatchMessage(Message msg) |
|
|
final |
|
|
void |
dump(Printer pw, String prefix) |
|
|
final |
|
|
Looper |
getLooper() |
|
|
|
|
|
void |
handleMessage(Message msg) |
|
|
final |
|
|
boolean |
hasMessages(int what) |
|
|
final |
|
|
boolean |
hasMessages(int what, Object object) |
|
|
final |
|
|
Message |
obtainMessage(int what, Object obj) |
|
|
final |
|
|
Message |
obtainMessage(int what, int arg1, int arg2, Object obj) |
|
|
final |
|
|
Message |
obtainMessage(int what, int arg1, int arg2) |
|
|
final |
|
|
Message |
obtainMessage() |
|
|
final |
|
|
Message |
obtainMessage(int what) |
|
|
final |
|
|
boolean |
post(Runnable r) |
|
|
final |
|
|
boolean |
postAtFrontOfQueue(Runnable r) |
|
|
final |
|
|
boolean |
postAtTime(Runnable r, Object token, long uptimeMillis) |
|
|
final |
|
|
boolean |
postAtTime(Runnable r, long uptimeMillis) |
|
|
final |
|
|
boolean |
postDelayed(Runnable r, long delayMillis) |
|
|
final |
|
|
void |
removeCallbacks(Runnable r, Object token) |
|
|
final |
|
|
void |
removeCallbacks(Runnable r) |
|
|
final |
|
|
void |
removeCallbacksAndMessages(Object token) |
|
|
final |
|
|
void |
removeMessages(int what) |
|
|
final |
|
|
void |
removeMessages(int what, Object object) |
|
|
final |
|
|
boolean |
sendEmptyMessage(int what) |
|
|
final |
|
|
boolean |
sendEmptyMessageAtTime(int what, long uptimeMillis) |
|
|
final |
|
|
boolean |
sendEmptyMessageDelayed(int what, long delayMillis) |
|
|
final |
|
|
boolean |
sendMessage(Message msg) |
|
|
final |
|
|
boolean |
sendMessageAtFrontOfQueue(Message msg) |
|
|
|
|
|
boolean |
sendMessageAtTime(Message msg, long uptimeMillis) |
|
|
final |
|
|
boolean |
sendMessageDelayed(Message msg, long delayMillis) |
|
|
|
|
|
String |
toString() |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Public Methods
public
final
void
cancelOperation(int token)
Attempts to cancel operation that has not already started. Note that
there is no guarantee that the operation will be canceled. They still may
result in a call to on[Query/Insert/Update/Delete]Complete after this
call has completed.
Parameters
token
| The token representing the operation to be canceled.
If multiple operations have the same token they will all be canceled.
|
public
void
handleMessage(Message msg)
Subclasses must implement this to receive messages.
Protected Methods
protected
void
onDeleteComplete(int token, Object cookie, int result)
Called when an asynchronous delete is completed.
protected
void
onInsertComplete(int token, Object cookie, Uri uri)
Called when an asynchronous insert is completed.
protected
void
onQueryComplete(int token, Object cookie, Cursor cursor)
Called when an asynchronous query is completed.
Parameters
token
| the token to identify the query, passed in from
startQuery(int, Object, Uri, String[], String, String[], String). |
cookie
| the cookie object that's passed in from startQuery(int, Object, Uri, String[], String, String[], String). |
cursor
| The cursor holding the results from the query.
|
protected
void
onUpdateComplete(int token, Object cookie, int result)
Called when an asynchronous update is completed.
Parameters
token
| the token to identify the query, passed in from
startUpdate(int, Object, Uri, ContentValues, String, String[]). |
cookie
| the cookie object that's passed in from
startUpdate(int, Object, Uri, ContentValues, String, String[]). |
result
| the result returned from the update operation
|