|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.objectxp.msg.Message
com.objectxp.msg.SmsMessage
com.objectxp.msg.ota.OTAMessage
public abstract class OTAMessage
This is the base class for OTA Messages.
Please note that both a SAX parser implementing the Java API for XML Processing (JAXP) and the jWAP library (jWAP.jar) must be available.
| Field Summary |
|---|
| Fields inherited from class com.objectxp.msg.SmsMessage |
|---|
CLASS_0, CLASS_1, CLASS_2, CLASS_3, DC_8BIT, DC_DEFAULT, DC_GROUP_DATA, DC_GROUP_GENERAL, DC_GROUP_MSG_WAITING_DISCARD, DC_GROUP_MSG_WAITING_STORE, DC_UCS2, INDICATION_ACTIVE, INDICATION_INACTIVE, INDICATION_TYPE_EMAIL, INDICATION_TYPE_FAX, INDICATION_TYPE_OTHER, INDICATION_TYPE_VOICEMAIL, NO_CLASS |
| Fields inherited from class com.objectxp.msg.Message |
|---|
ACK_TIME, MT_BINARY, MT_STATUS, MT_TEXT, SENDER_TYPE_ALPHA, SENDER_TYPE_GUESS, SENDER_TYPE_NUMBER |
| Constructor Summary | |
|---|---|
OTAMessage()
|
|
| Method Summary | |
|---|---|
void |
buildParts(java.lang.Class type,
int refNr)
Fragmentize the Multipart message. |
void |
buildParts(int refNr)
This method will be called by SmsService implementations prior to
sending a MultiPartMessage. |
SmsMessage[] |
getParts()
Returns the parts (fragments). |
java.lang.String |
toString()
Constructs a string representation of this Message |
| Methods inherited from class com.objectxp.msg.Message |
|---|
clone, getProperty, getSenderType, getTimestamp, setID, setProperty, setSenderType |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OTAMessage()
| Method Detail |
|---|
public SmsMessage[] getParts()
MultiPartMessage
getParts in interface MultiPartMessagepublic final void buildParts(int refNr)
MultiPartMessageSmsService implementations prior to
sending a MultiPartMessage.
buildParts() will split the message into multiple parts if necessary. The
parts can then be accessed by calling MultiPartMessage.getParts().
Please note that there is no need to invoke this method directly since SmsService implementations call this method automatically.
buildParts in interface MultiPartMessagerefNr - the reference-number to use for concatenated messages.
public final void buildParts(java.lang.Class type,
int refNr)
throws java.lang.IllegalArgumentException
MultiPartMessageInvoke this method before sending a Multipart message if you want to specify the type of the resulting fragments.
Example
The following example shows how to set the CIMD2 specific priority flag
on all fragments of a Multipart message:
Ringtone rt = new Ringtone("...");
rt.buildParts(Cimd2Message.class, myRefnr++);
Cimd2Message[] fragments = (Cimd2Message[]) rt.getParts();
for( int i=0; i < fragments.length; i++ ) {
fragments[i].setPriority(new Integer(5));
}
cimd2Service.sendMessage(rt);
buildParts in interface MultiPartMessagetype - the type used for the fragments. Must be an instance of SmsMessage.refNr - the reference-number to use for the concatenated messages.
java.lang.IllegalArgumentException - if the type is not an instance of SmsMessage or
is an instance of MultiPartMessage.public java.lang.String toString()
Message
toString in class SmsMessage
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||