TransactionBundlepublic class TransactionBundle extends Object A wrapper around the Bundle instances used to start the TransactionService.
It provides high-level APIs to set the information required for the latter to
instantiate transactions. |
Fields Summary |
---|
public static final String | TRANSACTION_TYPEKey for the transaction-type.
Allowed values for this key are: TYPE_PUSH_TRANSACTION, TYPE_RETRIEVE_TRANSACTION,
TYPE_SEND_TRANSACTION, and TYPE_READREC_TRANSACTION. | private static final String | PUSH_DATAKey of the push-data.
Used when TRANSACTION_TYPE is TYPE_PUSH_TRANSACTION. | private static final String | MMSC_URLKey of the MMSC server URL. | private static final String | PROXY_ADDRESSKey of the HTTP Proxy address. | private static final String | PROXY_PORTKey of the HTTP Proxy port. | public static final String | URIKey of the URI.
Indicates the URL of the M-Retrieve.conf in TYPE_RETRIEVE_TRANSACTION, or the
Uri of the M-Send.req/M-Read-Rec.ind in TYPE_SEND_TRANSACTION and
TYPE_READREC_TRANSACTION, respectively. | private final android.os.Bundle | mBundleThis is the real Bundle to be sent to the TransactionService upon calling
startService. |
Constructors Summary |
---|
private TransactionBundle(int transactionType)Private constructor.
mBundle = new Bundle();
mBundle.putInt(TRANSACTION_TYPE, transactionType);
| public TransactionBundle(int transactionType, String uri)Constructor of a bundle used for TransactionBundle instances of type
TYPE_RETRIEVE_TRANSACTION, TYPE_SEND_TRANSACTION, and TYPE_READREC_TRANSACTION.
this(transactionType);
mBundle.putString(URI, uri);
| public TransactionBundle(int transactionType, byte[] pushData)Constructor of a bundle used for TransactionBundle instances of type
TYPE_PUSH_TRANSACTION.
this(transactionType);
mBundle.putByteArray(PUSH_DATA, pushData);
| public TransactionBundle(android.os.Bundle bundle)Constructor of a transaction bundle used for incoming bundle instances.
mBundle = bundle;
|
Methods Summary |
---|
public android.os.Bundle | getBundle()
return mBundle;
| public java.lang.String | getMmscUrl()
return mBundle.getString(MMSC_URL);
| public java.lang.String | getProxyAddress()
return mBundle.getString(PROXY_ADDRESS);
| public int | getProxyPort()
return mBundle.getInt(PROXY_PORT);
| public byte[] | getPushData()
return mBundle.getByteArray(PUSH_DATA);
| public int | getTransactionType()
return mBundle.getInt(TRANSACTION_TYPE);
| public java.lang.String | getUri()
return mBundle.getString(URI);
| public void | setConnectionSettings(java.lang.String mmscUrl, java.lang.String proxyAddress, int proxyPort)
mBundle.putString(MMSC_URL, mmscUrl);
mBundle.putString(PROXY_ADDRESS, proxyAddress);
mBundle.putInt(PROXY_PORT, proxyPort);
| public void | setConnectionSettings(TransactionSettings settings)
setConnectionSettings(
settings.getMmscUrl(),
settings.getProxyAddress(),
settings.getProxyPort());
|
|