public abstract class OTAMessage extends SmsMessage implements MultiPartMessage
Please note that both a SAX parser implementing the Java API for XML Processing (JAXP) and the jWAP library (jWAP.jar) must be available.
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
ACK_TIME, MT_BINARY, MT_STATUS, MT_TEXT, SENDER_TYPE_ALPHA, SENDER_TYPE_GUESS, SENDER_TYPE_NUMBER
Constructor and Description |
---|
OTAMessage() |
Modifier and Type | Method and Description |
---|---|
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.util.Date |
getTimestamp()
Get the date where the message was sent / received.
|
java.lang.String |
toString()
Constructs a string representation of this Message
|
containsUserDataHeader, copyFields, getAlphabet, getBytes, getCodingGroup, getDeferredDeliveryAsDate, getDeferredDeliveryInMinutes, getID, getIndicationState, getIndicationType, getMessage, getMessageClass, getParent, getPID, getRecipient, getRecipientAddress, getSender, getSenderAddress, getType, getUserData, getUserDataHeader, getValidityPeriodAsDate, getValidityPeriodInMinutes, hasDeferredDelivery, hasMessageClass, hasValidityPeriod, isCompressed, isMMS, isRejectDuplicates, isRelativeDeferredDelivery, isRelativeValidityPeriod, isReplyPath, requestStatusReport, requestStatusReport, setAlphabet, setCodingGroup, setCompression, setDeferredDelivery, setDeferredDelivery, setIndicationState, setIndicationType, setMessage, setMessage, setMessageClass, setMMS, setParent, setPID, setRecipient, setRecipientAddress, setRejectDuplicates, setReplyPath, setSender, setSenderAddress, setType, setUserData, setUserDataHeader, setUserDataHeader, setValidityPeriod, setValidityPeriod
clone, getProperty, getSenderType, setID, setProperty, setSenderType
public SmsMessage[] getParts()
MultiPartMessage
getParts
in interface MultiPartMessage
public final void buildParts(int refNr)
MultiPartMessage
SmsService
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 MultiPartMessage
refNr
- the reference-number to use for concatenated messages.public final void buildParts(java.lang.Class type, int refNr) throws java.lang.IllegalArgumentException
MultiPartMessage
Invoke 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 MultiPartMessage
type
- 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
public java.util.Date getTimestamp()
Message
getTimestamp
in interface MultiPartMessage
getTimestamp
in class Message
object XP, Inc. © 2000-2013. All rights reserved object XP