com.objectxp.msg
Class GsmStatus

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

public class GsmStatus
extends java.lang.Object
implements SmsStatus

This class is a representation of the TP-STATUS field as defined in GSM 03.40. It is used in conjunction with SMS-Status reports.

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

Field Summary
static int CONGESTION
           
static int CONNECTION_REJECTED_BY_SMSC
           
static int ERROR_IN_RECIPIENT
           
static int INCOMPATIBLE_DESTINATION
           
static int NO_INTERWORKING_AVAILABLE
           
static int NO_RESPONSE_FROM_RECIPIENT
           
static int NOT_OPTIONABLE
           
static int QUALITY_NOT_AVAILABLE
           
static int QUALITY_OF_SERVICE_NA
           
static int RECIPIENT_BUSY
           
static int REMOTE_PROCEDURE_ERROR
           
static int SERVICE_REJECTED
           
static int SMS_DELETED_BY_ORIGINATOR
           
static int SMS_DELETED_BY_SMSC_ADMIN
           
static int SMS_FORWARDED_TO_RECIPIENT
           
static int SMS_NOT_EXISTS
           
static int SMS_RECEIVED_BY_RECIPIENT
           
static int SMS_REPLACED_BY_SC
           
static int SMS_VALIDITY_EXPIRED
           
static int UNKNOWN_ERROR
           
 
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 getReasonCode()
          Get the status code for this object.
 int getStatusValue()
          Get the status code for this object.
 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 occured.
 boolean isTemporaryError()
          Returns true if a temporary error has occured.
 boolean isTransactionCompleted()
          Returns true if the transaction has completed without error.
 boolean stillTryingTransferMessage()
          Returns true if the Message could not yet be delivered.
 java.lang.String toString()
          Returns a String representation of this GsmStatus (e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SMS_RECEIVED_BY_RECIPIENT

public static final int SMS_RECEIVED_BY_RECIPIENT
See Also:
Constant Field Values

SMS_FORWARDED_TO_RECIPIENT

public static final int SMS_FORWARDED_TO_RECIPIENT
See Also:
Constant Field Values

SMS_REPLACED_BY_SC

public static final int SMS_REPLACED_BY_SC
See Also:
Constant Field Values

CONGESTION

public static final int CONGESTION
See Also:
Constant Field Values

RECIPIENT_BUSY

public static final int RECIPIENT_BUSY
See Also:
Constant Field Values

NO_RESPONSE_FROM_RECIPIENT

public static final int NO_RESPONSE_FROM_RECIPIENT
See Also:
Constant Field Values

SERVICE_REJECTED

public static final int SERVICE_REJECTED
See Also:
Constant Field Values

QUALITY_NOT_AVAILABLE

public static final int QUALITY_NOT_AVAILABLE
See Also:
Constant Field Values

ERROR_IN_RECIPIENT

public static final int ERROR_IN_RECIPIENT
See Also:
Constant Field Values

REMOTE_PROCEDURE_ERROR

public static final int REMOTE_PROCEDURE_ERROR
See Also:
Constant Field Values

INCOMPATIBLE_DESTINATION

public static final int INCOMPATIBLE_DESTINATION
See Also:
Constant Field Values

CONNECTION_REJECTED_BY_SMSC

public static final int CONNECTION_REJECTED_BY_SMSC
See Also:
Constant Field Values

NOT_OPTIONABLE

public static final int NOT_OPTIONABLE
See Also:
Constant Field Values

QUALITY_OF_SERVICE_NA

public static final int QUALITY_OF_SERVICE_NA
See Also:
Constant Field Values

NO_INTERWORKING_AVAILABLE

public static final int NO_INTERWORKING_AVAILABLE
See Also:
Constant Field Values

SMS_VALIDITY_EXPIRED

public static final int SMS_VALIDITY_EXPIRED
See Also:
Constant Field Values

SMS_DELETED_BY_ORIGINATOR

public static final int SMS_DELETED_BY_ORIGINATOR
See Also:
Constant Field Values

SMS_DELETED_BY_SMSC_ADMIN

public static final int SMS_DELETED_BY_SMSC_ADMIN
See Also:
Constant Field Values

SMS_NOT_EXISTS

public static final int SMS_NOT_EXISTS
See Also:
Constant Field Values

UNKNOWN_ERROR

public static final int UNKNOWN_ERROR
See Also:
Constant Field Values
Method Detail

getStatusValue

public int getStatusValue()
Get the status code for this object.

Returns:
one of the constants in this class, e.g. SMS_RECEIVED_BY_RECIPIENT.

getReasonCode

public int getReasonCode()
Get the status code for this object.

Returns:
one of the constants in this class, e.g. SMS_RECEIVED_BY_RECIPIENT.

isTransactionCompleted

public boolean isTransactionCompleted()
Returns true if the transaction has completed without error.


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, when message has been delivered.

isPermanentError

public boolean isPermanentError()
Returns true if a permanent error has occured. The SMSC will stop trying to deliver the Message.

Specified by:
isPermanentError in interface SmsStatus

isTemporaryError

public boolean isTemporaryError()
Returns true if a temporary error has occured. The SMSC will retry to deliver the Message.


stillTryingTransferMessage

public boolean stillTryingTransferMessage()
Returns true if the Message could not yet be delivered.


toString

public java.lang.String toString()
Returns a String representation of this GsmStatus (e.g. "Transaction completed").

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


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