|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.os.Handler
android.content.AsyncQueryHandler
public abstract class AsyncQueryHandler
A helper class to help make handling asynchronous ContentResolver
queries easier.
| Nested Class Summary | |
|---|---|
protected static class |
AsyncQueryHandler.WorkerArgs
|
protected class |
AsyncQueryHandler.WorkerHandler
|
| Field Summary | |
|---|---|
(package private) ContentResolver |
mResolver
|
| Constructor Summary | |
|---|---|
AsyncQueryHandler(ContentResolver cr)
|
|
| Method Summary | |
|---|---|
void |
cancelOperation(int token)
Attempts to cancel operation that has not already started. |
protected Handler |
createHandler(Looper looper)
|
void |
handleMessage(Message msg)
Subclasses must implement this to receive messages. |
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. |
protected void |
onUpdateComplete(int token,
Object cookie,
int result)
Called when an asynchronous update is completed. |
void |
startDelete(int token,
Object cookie,
Uri uri,
String selection,
String[] selectionArgs)
This method begins an asynchronous delete. |
void |
startInsert(int token,
Object cookie,
Uri uri,
ContentValues initialValues)
This method begins an asynchronous insert. |
void |
startQuery(int token,
Object cookie,
Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String orderBy)
This method begins an asynchronous query. |
void |
startUpdate(int token,
Object cookie,
Uri uri,
ContentValues values,
String selection,
String[] selectionArgs)
This method begins an asynchronous update. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
ContentResolver mResolver
| Constructor Detail |
|---|
public AsyncQueryHandler(ContentResolver cr)
| Method Detail |
|---|
protected Handler createHandler(Looper looper)
public void startQuery(int token,
Object cookie,
Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String orderBy)
onQueryComplete(int, java.lang.Object, android.database.Cursor) is called.
token - A token passed into onQueryComplete(int, java.lang.Object, android.database.Cursor) to identify
the query.cookie - An object that gets passed into onQueryComplete(int, java.lang.Object, android.database.Cursor)public final void cancelOperation(int token)
token - The token representing the operation to be canceled.
If multiple operations have the same token they will all be canceled.
public final void startInsert(int token,
Object cookie,
Uri uri,
ContentValues initialValues)
onInsertComplete(int, java.lang.Object, android.net.Uri) is called.
token - A token passed into onInsertComplete(int, java.lang.Object, android.net.Uri) to identify
the insert operation.cookie - An object that gets passed into onInsertComplete(int, java.lang.Object, android.net.Uri)uri - the Uri passed to the insert operation.initialValues - the ContentValues parameter passed to the insert operation.
public final void startUpdate(int token,
Object cookie,
Uri uri,
ContentValues values,
String selection,
String[] selectionArgs)
onUpdateComplete(int, java.lang.Object, int) is called.
token - A token passed into onUpdateComplete(int, java.lang.Object, int) to identify
the update operation.cookie - An object that gets passed into onUpdateComplete(int, java.lang.Object, int)uri - the Uri passed to the update operation.values - the ContentValues parameter passed to the update operation.
public final void startDelete(int token,
Object cookie,
Uri uri,
String selection,
String[] selectionArgs)
onDeleteComplete(int, java.lang.Object, int) is called.
token - A token passed into onDeleteComplete(int, java.lang.Object, int) to identify
the delete operation.cookie - An object that gets passed into onDeleteComplete(int, java.lang.Object, int)uri - the Uri passed to the delete operation.selection - the where clause.
protected void onQueryComplete(int token,
Object cookie,
Cursor cursor)
token - the token to identify the query, passed in from
startQuery(int, java.lang.Object, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String).cookie - the cookie object that's passed in from startQuery(int, java.lang.Object, android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String).cursor - The cursor holding the results from the query.
protected void onInsertComplete(int token,
Object cookie,
Uri uri)
token - the token to identify the query, passed in from
startInsert(int, java.lang.Object, android.net.Uri, android.content.ContentValues).cookie - the cookie object that's passed in from
startInsert(int, java.lang.Object, android.net.Uri, android.content.ContentValues).uri - the uri returned from the insert operation.
protected void onUpdateComplete(int token,
Object cookie,
int result)
token - the token to identify the query, passed in from
startUpdate(int, java.lang.Object, android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]).cookie - the cookie object that's passed in from
startUpdate(int, java.lang.Object, android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]).result - the result returned from the update operation
protected void onDeleteComplete(int token,
Object cookie,
int result)
token - the token to identify the query, passed in from
startDelete(int, java.lang.Object, android.net.Uri, java.lang.String, java.lang.String[]).cookie - the cookie object that's passed in from
startDelete(int, java.lang.Object, android.net.Uri, java.lang.String, java.lang.String[]).result - the result returned from the delete operationpublic void handleMessage(Message msg)
Handler
handleMessage in class Handler
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||