FileDocCategorySizeDatePackage
ServerTransaction.javaAPI DocAndroid 1.5 API1909Wed May 06 22:42:46 BST 2009com.android.im.imps

ServerTransaction

public final class ServerTransaction extends ImpsTransaction

Fields Summary
private Primitive
mRequest
Constructors Summary
ServerTransaction(String id, ImpsConnection connection, Primitive request)

        setTransactionInfo(id, connection);
        mRequest = request;
        request.setTransaction(this);
    
Methods Summary
public PrimitivegetRequest()
Gets the request of this server transaction.

return
the request.

        return mRequest;
    
public voidsendResponse(Primitive response)
Sends a response of this transaction back to the server.

param
response the response to send.

        response.setTransactionMode(TransactionMode.Response);
        sendPrimitive(response);
    
public voidsendStatusResponse(java.lang.String code)
Sends a Status response of this transaction back to the server.

param
response the response to send.

        Primitive status = new Primitive(ImpsTags.Status);
        status.setTransactionMode(TransactionMode.Response);
        status.addElement(ImpsTags.Result).addChild(ImpsTags.Code, code);

        sendPrimitive(status);