Methods Summary |
---|
protected void | notifyAsyncCompletionError(com.android.im.engine.ImErrorInfo error)
if (!mCompletionNotified) {
mCompletionNotified = true;
if (mCompletionCallback != null)
mCompletionCallback.onError(error);
}
|
protected void | notifyAsyncCompletionSuccess()
if (!mCompletionNotified) {
mCompletionNotified = true;
if (mCompletionCallback != null)
mCompletionCallback.onComplete();
}
|
final void | notifyError(com.android.im.engine.ImErrorInfo error)Notify that an error occurs in the transaction.
notifyErrorResponse(new ImpsErrorInfo(error.getCode(), error.getDescription(), null));
|
protected void | notifyErrorResponse(ImpsErrorInfo error)
onResponseError(error);
mTransManager.endClientTransaction(this);
notifyAsyncCompletionError(error);
|
final void | notifyResponse(Primitive response)Notify that a response from the server has arrived.
response.setTransaction(this);
ImpsErrorInfo error = ImpsUtils.checkResultError(response);
if (error != null) {
notifyErrorResponse(error);
} else {
notifySuccessResponse(response);
}
|
protected void | notifySuccessResponse(Primitive response)
onResponseOk(response);
mTransManager.endClientTransaction(this);
notifyAsyncCompletionSuccess();
|
public abstract void | onResponseError(ImpsErrorInfo error)
|
public abstract void | onResponseOk(Primitive response)
|
public void | sendRequest(Primitive request)Sends a request within this transaction.
sendPrimitive(request);
|