public interface MultiPartMessage
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.
|
SmsMessage[] getParts()
void buildParts(java.lang.Class type, int refnr) throws java.lang.IllegalArgumentException
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);
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.void buildParts(int refnr)
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 getParts()
.
Please note that there is no need to invoke this method directly since SmsService implementations call this method automatically.
refnr
- the reference-number to use for concatenated messages.java.util.Date getTimestamp()
object XP, Inc. © 2000-2013. All rights reserved object XP