com.unipro.smlib
Class ACKReport

java.lang.Object
  |
  +--com.unipro.smlib.ACKReport
All Implemented Interfaces:
com.unipro.smlib.InputItem, java.io.Serializable

public class ACKReport
extends java.lang.Object
implements com.unipro.smlib.InputItem, java.io.Serializable

Class represents input ACK report of submitted message (acknowledgment about submitting message).
ACKReport object is passed as a parameter to ACKListener.proccessACKReport() method.
To process ACK reports register ACKListener in the SmsManager. You can get parameters of the ACK report using get methods.

Parameters are:
Recipient number The phone number in national format without '+'. For example: 79029070904.
SMSC Number The number of Short Message Service Center in national format without '+'.
Reception Time Reception time of message in java.util.GregorianCalendar format.
SMSC Time The time stamp from SMSC in java.util.GregorianCalendar format.
Status The status of the sent message. Constants STATUS_XXX of ACKReport class represent different kind of statuses.
More Messages The More Messages is the information element by which the SMSC informs the mobile station that there are one or more messages waiting in that SMSC to be delivered to the mobile.
Message Reference Message references parameter can be use to compare message reference of ACK request with message reference of Outgoing message, which is returned by sendMessage method of SmsManager.

Message references


Message references parameter can be use to compare message reference of ACK request with message reference of Outgoing message, which is returned by sendMessage method of SmsManager. It can be possible to determinate for which message current ACK was received if you set message reference parameter for outgoing message.
NOTES:
1) Message Reference parameter can only take on a value form 0 to 255.
2) SMS Center can ignore this parameter (it depends on settings of SMSC).

See Also:
Serialized Form

Field Summary
static int STATUS_CONGESTION
          Temporary error, SC still trying to transfer SM.
static int STATUS_CONGESTION2
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_CONNECTION_REJECTED_BY_SME
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_DELIVERED
          Short message transaction completed.
static int STATUS_ERROR_IN_SME
          Temporary error, SC still trying to transfer SM.
static int STATUS_ERROR_IN_SME2
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_FORWARDED
          Short message transaction completed.
static int STATUS_INCOMPATIBLE_DESTINATION
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_NO_INTERWORKING_AVAILABLE
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_NO_RESPONSE_FROM_SME
          Temporary error, SC still trying to transfer SM.
static int STATUS_NO_RESPONSE_FROM_SME2
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_NOT_OBTAINABLE
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE
          Temporary error, SC still trying to transfer SM.
static int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE2
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE3
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_REJECTED
          Temporary error, SC still trying to transfer SM.
static int STATUS_REMOTE_PROCEDURE_ERROR
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_REPLACED
          Short message transaction completed.
static int STATUS_SERVICE_REJECTED
          Temporary error, SC still trying to transfer SM.
static int STATUS_SERVICE_REJECTED2
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_SM_DELETED_BY_ORIGINATING_SME
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_SM_DELETED_BY_SC_ADMINISTRATOR
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_SM_DOES_NOT_EXIST
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_SM_VALIDITY_PERIOD_EXPIRED
          Permanent error, SC is not making any more transfer attempts.
static int STATUS_SME_BUSY
          Temporary error, SC still trying to transfer SM.
static int STATUS_SME_BUSY2
          Temporary error, SC is not making any more transfer attempts.
static int STATUS_UNKNOWN
          Status of the sent message.
 
Method Summary
 int getMessageReference()
          Gets message reference of this ACK.
 boolean getMoreMessages()
          Gets more messages flag.
 java.util.GregorianCalendar getReceptionTime()
          Gets reception time.
 java.lang.String getRecipientNumber()
          Gets recipient phone number.
 java.lang.String getSMSCNumber()
          Gets Short Message Service Center number.
 java.util.GregorianCalendar getSMSCTime()
          Gets Short Message Service Center time.
 int getStatus()
          Gets the status of the sent message.
Constants of ACKReport, which begin with STATUS_, represent statuses (see constants STATUS_XXX).
 java.lang.String toString()
          Returns a String representation of the ACK.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_DELIVERED

public static final int STATUS_DELIVERED
Short message transaction completed. Short message received by the SME.

STATUS_FORWARDED

public static final int STATUS_FORWARDED
Short message transaction completed. Short message forwarded by the SC to the SME but the SC is unable to confirm delivery.

STATUS_REPLACED

public static final int STATUS_REPLACED
Short message transaction completed. Short message replaced by the SC.

STATUS_CONGESTION

public static final int STATUS_CONGESTION
Temporary error, SC still trying to transfer SM. Congestion.

STATUS_SME_BUSY

public static final int STATUS_SME_BUSY
Temporary error, SC still trying to transfer SM. SME busy.

STATUS_NO_RESPONSE_FROM_SME

public static final int STATUS_NO_RESPONSE_FROM_SME
Temporary error, SC still trying to transfer SM. No response from SME.

STATUS_SERVICE_REJECTED

public static final int STATUS_SERVICE_REJECTED
Temporary error, SC still trying to transfer SM. Service rejected.

STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE

public static final int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE
Temporary error, SC still trying to transfer SM. Quality of service not available.

STATUS_ERROR_IN_SME

public static final int STATUS_ERROR_IN_SME
Temporary error, SC still trying to transfer SM. Error in SME.

STATUS_REJECTED

public static final int STATUS_REJECTED
Temporary error, SC still trying to transfer SM. Message was rejected

STATUS_REMOTE_PROCEDURE_ERROR

public static final int STATUS_REMOTE_PROCEDURE_ERROR
Permanent error, SC is not making any more transfer attempts. Remote procedure error.

STATUS_INCOMPATIBLE_DESTINATION

public static final int STATUS_INCOMPATIBLE_DESTINATION
Permanent error, SC is not making any more transfer attempts. Incompatible destination.

STATUS_CONNECTION_REJECTED_BY_SME

public static final int STATUS_CONNECTION_REJECTED_BY_SME
Permanent error, SC is not making any more transfer attempts. Connection rejected by SME.

STATUS_NOT_OBTAINABLE

public static final int STATUS_NOT_OBTAINABLE
Permanent error, SC is not making any more transfer attempts. Not obtainable.

STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE2

public static final int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE2
Permanent error, SC is not making any more transfer attempts. Quality of service not available.

STATUS_NO_INTERWORKING_AVAILABLE

public static final int STATUS_NO_INTERWORKING_AVAILABLE
Permanent error, SC is not making any more transfer attempts. No interworking available.

STATUS_SM_VALIDITY_PERIOD_EXPIRED

public static final int STATUS_SM_VALIDITY_PERIOD_EXPIRED
Permanent error, SC is not making any more transfer attempts. SM Validity Period Expired.

STATUS_SM_DELETED_BY_ORIGINATING_SME

public static final int STATUS_SM_DELETED_BY_ORIGINATING_SME
Permanent error, SC is not making any more transfer attempts. SM Deleted by originating SME.

STATUS_SM_DELETED_BY_SC_ADMINISTRATOR

public static final int STATUS_SM_DELETED_BY_SC_ADMINISTRATOR
Permanent error, SC is not making any more transfer attempts. SM Deleted by SC Administration.

STATUS_SM_DOES_NOT_EXIST

public static final int STATUS_SM_DOES_NOT_EXIST
Permanent error, SC is not making any more transfer attempts. SM does not exist (The SM may have previously existed in the SC but the SC no longer has knowledge of it or the SM may never have previously existed in the SC).

STATUS_CONGESTION2

public static final int STATUS_CONGESTION2
Temporary error, SC is not making any more transfer attempts. Congestion.

STATUS_SME_BUSY2

public static final int STATUS_SME_BUSY2
Temporary error, SC is not making any more transfer attempts. SME busy.

STATUS_NO_RESPONSE_FROM_SME2

public static final int STATUS_NO_RESPONSE_FROM_SME2
Temporary error, SC is not making any more transfer attempts. No response from SME.

STATUS_SERVICE_REJECTED2

public static final int STATUS_SERVICE_REJECTED2
Temporary error, SC is not making any more transfer attempts. Service rejected.

STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE3

public static final int STATUS_QUALITY_OF_SERVICE_NOT_AVAILABLE3
Temporary error, SC is not making any more transfer attempts. Quality of service not available.

STATUS_ERROR_IN_SME2

public static final int STATUS_ERROR_IN_SME2
Temporary error, SC is not making any more transfer attempts. Error in SME.

STATUS_UNKNOWN

public static final int STATUS_UNKNOWN
Status of the sent message. Message status is unknown.
Method Detail

getSMSCNumber

public java.lang.String getSMSCNumber()
Gets Short Message Service Center number.
Specified by:
getSMSCNumber in interface com.unipro.smlib.InputItem
Returns:
the Short Message Service Center number in national format without '+'.

getSMSCTime

public java.util.GregorianCalendar getSMSCTime()
Gets Short Message Service Center time. Short Message Service Center time is a time stamp, which was set by SMSC before sending of ACK report.
Specified by:
getSMSCTime in interface com.unipro.smlib.InputItem
Returns:
the Short Message Service Center time in java.util.GregorianCalendar format.

getReceptionTime

public java.util.GregorianCalendar getReceptionTime()
Gets reception time. Short Message Service Center time is a time stamp, which was set in SMCSC after message was sent.
Returns:
the reception time in java.util.GregorianCalendar format.

getRecipientNumber

public java.lang.String getRecipientNumber()
Gets recipient phone number.
Returns:
the recipient phone number in national format without '+'.

getStatus

public int getStatus()
Gets the status of the sent message.
Constants of ACKReport, which begin with STATUS_, represent statuses (see constants STATUS_XXX).
Returns:
the status of the sent message.

getMoreMessages

public boolean getMoreMessages()
Gets more messages flag. The More Messages is the information element by which the SMSC informs the mobile station that there are one or more messages waiting in that SMSC to be delivered to the mobile.
Returns:
more messages flag.

getMessageReference

public int getMessageReference()
Gets message reference of this ACK.
more about references
Returns:
number to refer.

toString

public java.lang.String toString()
Returns a String representation of the ACK. Format: "ACKReport [Recipient Number: {recipient number}, SMSC Number: {SMSC number}, SMSC Time: {SMSC time}, Reception Time: {reception time}, Status: {status}, More Messages: {true/false}, Message Reference {message reference}]".
Overrides:
toString in class java.lang.Object
Returns:
a string representing ACK.