com.objectxp.msg
Class SmppMessage

java.lang.Object
  extended by com.objectxp.msg.Message
      extended by com.objectxp.msg.SmsMessage
          extended by com.objectxp.msg.SmppMessage
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SmppMessage
extends SmsMessage

This class extends the class SmsMessage with SMPP specific properties.

See Also:
SmppSmsService, Serialized Form

Field Summary
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)
 
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
SmppMessage()
           
SmppMessage(SmsService service)
          Deprecated. since jSMS 1.7, use SmppMessage()
 
Method Summary
 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
 
Methods inherited from class com.objectxp.msg.SmsMessage
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
 
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
 

Field Detail

ST_DEFAULT

public static final java.lang.String ST_DEFAULT
Service Type: Default


ST_CMT

public static final java.lang.String ST_CMT
Service Type: Cellular Messaging

See Also:
Constant Field Values

ST_CPT

public static final java.lang.String ST_CPT
Service Type: Cellular Paging

See Also:
Constant Field Values

ST_VMN

public static final java.lang.String ST_VMN
Service Type: Voice Mail Notification

See Also:
Constant Field Values

ST_VMA

public static final java.lang.String ST_VMA
Service Type: Voice Mail Alerting

See Also:
Constant Field Values

ST_WAP

public static final java.lang.String ST_WAP
Service Type: Wireless Application Protocol (WAP)

See Also:
Constant Field Values

ST_USSD

public static final java.lang.String ST_USSD
Service Type: Unstructured Supplementary Services Data

See Also:
Constant Field Values

MSG_MODE_UNSET

public static final int MSG_MODE_UNSET
Message mode: Unset, determined by service init property "smpp.message.mode"

See Also:
Constant Field Values

MSG_MODE_DEFAULT

public static final int MSG_MODE_DEFAULT
Message mode: Default MC Mode

See Also:
Constant Field Values

MSG_MODE_DGRAM

public static final int MSG_MODE_DGRAM
Message mode: Datagram

See Also:
Constant Field Values

MSG_MODE_TRX

public static final int MSG_MODE_TRX
Message mode: Transaction

See Also:
Constant Field Values

MSG_MODE_SAF

public static final int MSG_MODE_SAF
Message mode: Store and Forward

See Also:
Constant Field Values

MSG_TYPE_SUBMIT

public static final int MSG_TYPE_SUBMIT
Message type: submit_sm (default)

See Also:
Constant Field Values

MSG_TYPE_DATA

public static final int MSG_TYPE_DATA
Message type: data_sm

See Also:
Constant Field Values
Constructor Detail

SmppMessage

public SmppMessage()

SmppMessage

public SmppMessage(SmsService service)
            throws java.lang.IllegalArgumentException
Deprecated. since jSMS 1.7, use SmppMessage()

Construct a new SmppMessage.

Parameters:
service - the SmsService used to send this message
Throws:
java.lang.IllegalArgumentException - if the service is null
Method Detail

getPriorityFlag

public int getPriorityFlag()
Returns the value of the priority flag.


replaceIfPresent

public boolean replaceIfPresent()
Returns the value of the "replace if present" flag


setPriorityFlag

public void setPriorityFlag(int priority)
                     throws java.lang.IllegalArgumentException
The priority flag allows the originating SME to assign a priority level to the short message. Four Priority Levels are supported:

setMessageType

public void setMessageType(int type)
                    throws java.lang.IllegalArgumentException
Set the underlying SMPP operation for this message. Possible types are MSG_TYPE_SUBMIT (default, corresponds to SMPP submit_sm) and MSG_TYPE_DATA (corresponds to SMPP data_sm).

Parameters:
type - the operation type (MSG_TYPE_SUBMIT, MSG_TYPE_DATA).
Throws:
java.lang.IllegalArgumentException - if an illegal argument has been passed.
Since:
jSMS 1.8.8

getMessageType

public int getMessageType()
Returns the underlying SMPP operation for this message.

Returns:
the message type (MSG_TYPE_SUBMIT or MSG_TYPE_DATA).

replaceIfPresent

public 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. The SMSC will replace an existing message provided that the source address, destination address and serviceType match the same fields in the new message.


getServiceType

public java.lang.String getServiceType()
Returns the service type parameter or null if unset.


setServiceType

public void setServiceType(java.lang.String type)
The service type parameter can be used to indicate the SMS Application service associated with the message. Specifying the service_type allows the ESME to Set to null for default SMSC settings.

Parameters:
type - the service type (max length: 6 characters). If the length is greater than 6, the service type will be truncated to 6 characters.

toString

public java.lang.String toString()
Description copied from class: Message
Constructs a string representation of this Message

Overrides:
toString in class SmsMessage

setMessageMode

public void setMessageMode(int mode)
Set the message mode for transporting this message. Valid modes are MSG_MODE_SAF, MSG_MODE_DGRAM, MSG_MODE_DEFAULT and MSG_MODE_TRX. See the SMPP specification for more information about SMPP Message Modes.

Parameters:
mode - the message mode

getMessageMode

public int getMessageMode()
Returns the message mode in use for transporting this message.

Returns:
the message mode

setOptionalParameter

public void setOptionalParameter(SmppOptionalParameter param)
Set an optional TLV (TagLengthValue) parameter for this message.

Parameters:
param - The TLV

getOptionalParameter

public SmppOptionalParameter getOptionalParameter(int tag)
Get a TLV associated with this SmppMessage.

Parameters:
tag - the TLV tag
Returns:
the TLV or null if no such tag is associated with the SmppMessage

getOptionalParameters

public java.util.Enumeration getOptionalParameters()
Returns an enumeration of SMPPOptionalParameter objects associated with this SmppMessage.


hasOptionalParameters

public boolean hasOptionalParameters()
Returns true if this SmppMessage has optional Parameters (TLV) associated



object XP, Inc. © 2000-2008. All rights reserved object XP