com.objectxp.msg
Class SmppStatus

java.lang.Object
  extended by com.objectxp.msg.SmppStatus
All Implemented Interfaces:
SmsStatus, java.io.Serializable

public class SmppStatus
extends java.lang.Object
implements SmsStatus

This class is a representation of a SMPP Delivery Receipt. It is used in conjunction with SMS status reports.

See Also:
SmsMessage.requestStatusReport(boolean), StatusReportMessage.getStatus(), Serialized Form

Field Summary
static int STATE_ACCEPTED
          Message is in accepted state.
static int STATE_DELETED
          Message has been deleted.
static int STATE_DELIVERED
          Message is delivered to destination
static int STATE_ENROUTE
          The message is in enroute state.
static int STATE_EXPIRED
          Message validity period has expired.
static int STATE_REJECTED
          Message is in a rejected state.
static int STATE_SCHEDULED
          The message is scheduled.
static int STATE_SKIPPED
          The message was accepted but not transmitted on the network.
static int STATE_UNDELIVERABLE
          Message is undeliverable.
static int STATE_UNKNOWN
          Message is in unknown state.
 
Constructor Summary
SmppStatus(int messageState, int networkType, int errorCode)
          Construct a new SMPP Status.
 
Method Summary
 java.util.Date getDischargeTime()
          Get the time at which a previously submitted SMS was successfully delivered to or attempted to deliver to the recipient or disposed of by the SMSC.
 int getErrorCode()
          Returns the error code or -1 if not set
 int getMessageState()
          Returns the Message State.
 int getNetworkType()
          Returns the network type or -1 if not set
 SmppOptionalParameter getOptionalParameter(int tag)
          Get a TLV associated with this SMPP Status.
 java.util.Enumeration getOptionalParameters()
          Returns an enumeration of SMPPOptionalParameter objects associated.
 boolean hasOptionalParameters()
          Returns true if this Object has optional Parameters (TLV) associated.
 boolean isCancelled()
          Returns true if the indicated message has been cancelled by a previous call to SmsService.cancel(Message).
 boolean isDeleted()
          Returns true if the indicated message has been deleted.
 boolean isDelivered()
          Check if the Message has been sent sucessfuly.
 boolean isPermanentError()
          Returns true if a permanent error has occurred.
 java.lang.String toString()
          Constructs a string representation of this object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_SCHEDULED

public static final int STATE_SCHEDULED
The message is scheduled. Delivery has not yet been initiated.

See Also:
Constant Field Values

STATE_ENROUTE

public static final int STATE_ENROUTE
The message is in enroute state.

See Also:
Constant Field Values

STATE_DELIVERED

public static final int STATE_DELIVERED
Message is delivered to destination

See Also:
Constant Field Values

STATE_EXPIRED

public static final int STATE_EXPIRED
Message validity period has expired.

See Also:
Constant Field Values

STATE_DELETED

public static final int STATE_DELETED
Message has been deleted.

See Also:
Constant Field Values

STATE_UNDELIVERABLE

public static final int STATE_UNDELIVERABLE
Message is undeliverable.

See Also:
Constant Field Values

STATE_ACCEPTED

public static final int STATE_ACCEPTED
Message is in accepted state.

See Also:
Constant Field Values

STATE_UNKNOWN

public static final int STATE_UNKNOWN
Message is in unknown state.

See Also:
Constant Field Values

STATE_REJECTED

public static final int STATE_REJECTED
Message is in a rejected state.

See Also:
Constant Field Values

STATE_SKIPPED

public static final int STATE_SKIPPED
The message was accepted but not transmitted on the network.

See Also:
Constant Field Values
Constructor Detail

SmppStatus

public SmppStatus(int messageState,
                  int networkType,
                  int errorCode)
Construct a new SMPP Status.

Parameters:
messageState - the message state.
networkType - the network type
errorCode - the network error code
Method Detail

isDelivered

public boolean isDelivered()
Description copied from interface: SmsStatus
Check if the Message has been sent sucessfuly.

Specified by:
isDelivered in interface SmsStatus
Returns:
true if the message has been delivered, false otherwise.

isPermanentError

public boolean isPermanentError()
Returns true if a permanent error has occurred. The SMSC will stop trying to deliver the Message. The following message states are considered permanent errors:

Specified by:
isPermanentError in interface SmsStatus

getMessageState

public int getMessageState()
Returns the Message State.

Returns:
one of the STATE_ constants.

getNetworkType

public int getNetworkType()
Returns the network type or -1 if not set


getErrorCode

public int getErrorCode()
Returns the error code or -1 if not set


toString

public java.lang.String toString()
Constructs a string representation of this object

Overrides:
toString in class java.lang.Object

getDischargeTime

public java.util.Date getDischargeTime()
Description copied from interface: SmsStatus
Get the time at which a previously submitted SMS was successfully delivered to or attempted to deliver to the recipient or disposed of by the SMSC.

Specified by:
getDischargeTime in interface SmsStatus
Returns:
the discharge time or null if not known

isCancelled

public boolean isCancelled()
Description copied from interface: SmsStatus
Returns true if the indicated message has been cancelled by a previous call to SmsService.cancel(Message).

Specified by:
isCancelled in interface SmsStatus

isDeleted

public boolean isDeleted()
Description copied from interface: SmsStatus
Returns true if the indicated message has been deleted.

Specified by:
isDeleted in interface SmsStatus

getOptionalParameter

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

Parameters:
tag - the TLV tag
Returns:
the TLV or null if no such tag is associated with the SMPP Status.
Since:
jSMS 2.2.2

getOptionalParameters

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

Since:
jSMS 2.2.2

hasOptionalParameters

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

Since:
jSMS 2.2.2


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