FileDocCategorySizeDatePackage
TransactionState.javaAPI DocAndroid 1.5 API2548Wed May 06 22:42:46 BST 2009com.android.mms.transaction

TransactionState

public class TransactionState extends Object
TransactionState intends to encapsulate all the informations which would be known by the observers of transactions. To encapsulate Transaction- State into an intent, it should implement Parcelable interface.

Fields Summary
public static final int
INITIALIZED
Result code indicates the Transaction has not started.
public static final int
SUCCESS
Result code indicates the Transaction successfully complete.
public static final int
FAILED
Result code indicates the Transaction failed.
private android.net.Uri
mContentUri
private int
mState
Constructors Summary
public TransactionState()


      
        mState = INITIALIZED;
        mContentUri = null;
    
Methods Summary
public synchronized android.net.UrigetContentUri()
To represent the result uri of transaction such as uri of MM.

return
Result uri.

        return mContentUri;
    
public synchronized intgetState()
To represent the current state(or the result of processing) to the ones who wants to know the state.

return
Current state of the Transaction.

        return mState;
    
synchronized voidsetContentUri(android.net.Uri uri)
To set the result uri. This method is only invoked by the transactions.

param
uri The result uri.

        mContentUri = uri;
    
synchronized voidsetState(int state)
To set the state of transaction. This method is only invoked by the transactions.

param
state The current state of transaction.

        if ((state < INITIALIZED) && (state > FAILED)) {
            throw new IllegalArgumentException("Bad state: " + state);
        }
        mState = state;