public class SmppMessage extends SmsMessage
SmppSmsService
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
MSG_MODE_DEFAULT
Message mode: Default MC Mode
|
static int |
MSG_MODE_DGRAM
Message mode: Datagram
|
static int |
MSG_MODE_SAF
Message mode: Store and Forward
|
static int |
MSG_MODE_TRX
Message mode: Transaction
|
static int |
MSG_MODE_UNSET
Message mode: Unset, determined by service init property "smpp.message.mode"
|
static int |
MSG_TYPE_DATA
Message type: data_sm
|
static int |
MSG_TYPE_SUBMIT
Message type: submit_sm (default)
|
static java.lang.String |
ST_CMT
Service Type: Cellular Messaging
|
static java.lang.String |
ST_CPT
Service Type: Cellular Paging
|
static java.lang.String |
ST_DEFAULT
Service Type: Default
|
static java.lang.String |
ST_USSD
Service Type: Unstructured Supplementary Services Data
|
static java.lang.String |
ST_VMA
Service Type: Voice Mail Alerting
|
static java.lang.String |
ST_VMN
Service Type: Voice Mail Notification
|
static java.lang.String |
ST_WAP
Service Type: Wireless Application Protocol (WAP)
|
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 |
---|
SmppMessage() |
SmppMessage(SmsService service)
Deprecated.
since jSMS 1.7, use
SmppMessage() |
Modifier and Type | Method and Description |
---|---|
int |
getMessageMode()
Returns the message mode in use for transporting this message.
|
int |
getMessageType()
Returns the underlying SMPP operation for this message.
|
SmppOptionalParameter |
getOptionalParameter(int tag)
Get a TLV associated with this SmppMessage.
|
java.util.Enumeration |
getOptionalParameters()
Returns an enumeration of SMPPOptionalParameter objects associated
with this SmppMessage.
|
int |
getPriorityFlag()
Returns the value of the priority flag.
|
java.lang.String |
getServiceType()
Returns the service type parameter or null if unset.
|
boolean |
hasOptionalParameters()
Returns true if this SmppMessage has optional Parameters (TLV) associated
|
boolean |
replaceIfPresent()
Returns the value of the "replace if present" flag
|
void |
replaceIfPresent(boolean replace)
The "replace if present" parameter is used to request the SMSC to replace a
previously submitted message, that is still pending delivery.
|
void |
setMessageMode(int mode)
Set the message mode for transporting this message.
|
void |
setMessageType(int type)
Set the underlying SMPP operation for this message.
|
void |
setOptionalParameter(SmppOptionalParameter param)
Set an optional TLV (TagLengthValue) parameter for this message.
|
void |
setPriorityFlag(int priority)
The priority flag allows the originating SME to assign a priority level
to the short message.
|
void |
setServiceType(java.lang.String type)
The service type parameter can be used to indicate the SMS Application service
associated with the message.
|
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, getTimestamp, setID, setProperty, setSenderType
public static final java.lang.String ST_DEFAULT
public static final java.lang.String ST_CMT
public static final java.lang.String ST_CPT
public static final java.lang.String ST_VMN
public static final java.lang.String ST_VMA
public static final java.lang.String ST_WAP
public static final java.lang.String ST_USSD
public static final int MSG_MODE_UNSET
public static final int MSG_MODE_DEFAULT
public static final int MSG_MODE_DGRAM
public static final int MSG_MODE_TRX
public static final int MSG_MODE_SAF
public static final int MSG_TYPE_SUBMIT
public static final int MSG_TYPE_DATA
public SmppMessage()
public SmppMessage(SmsService service) throws java.lang.IllegalArgumentException
SmppMessage()
service
- the SmsService used to send this messagejava.lang.IllegalArgumentException
- if the service is nullpublic int getPriorityFlag()
public boolean replaceIfPresent()
public void setPriorityFlag(int priority) throws java.lang.IllegalArgumentException
priority
- the priority.java.lang.IllegalArgumentException
public void setMessageType(int type) throws java.lang.IllegalArgumentException
type
- the operation type (MSG_TYPE_SUBMIT, MSG_TYPE_DATA).java.lang.IllegalArgumentException
- if an illegal argument has been passed.public int getMessageType()
public void replaceIfPresent(boolean replace)
public java.lang.String getServiceType()
public void setServiceType(java.lang.String type)
type
- the service type (max length: 6 characters). If the length is
greater than 6, the service type will be truncated to 6 characters.public java.lang.String toString()
Message
toString
in class SmsMessage
public void setMessageMode(int mode)
MSG_MODE_SAF
,
MSG_MODE_DGRAM
, MSG_MODE_DEFAULT
and MSG_MODE_TRX
. See the
SMPP specification for more information about SMPP Message Modes.mode
- the message modepublic int getMessageMode()
public void setOptionalParameter(SmppOptionalParameter param)
param
- The TLVpublic SmppOptionalParameter getOptionalParameter(int tag)
tag
- the TLV tagpublic java.util.Enumeration getOptionalParameters()
public boolean hasOptionalParameters()
object XP, Inc. © 2000-2013. All rights reserved object XP