QJCC homepage

biz.chitec.quarterback.util
Class SMS

java.lang.Object
  extended bybiz.chitec.quarterback.util.SMS

public class SMS
extends java.lang.Object

Representation of an SMS as it is used in GSM cellular networks. This class knows especially about conversion of an SMS to and from PDU format. It uses the charset classes and the charset framework to convert the SMS representation. Therefore, the GSM-SMS and the HexNibble charsets must be registered within the JVM for this class to work correctly.

Version:
$Id: 0ed4d74038f596b1e8f5cf105962c7a6f68320e7 $
Author:
cantamen/Dirk Hillbrecht 2005. Distributed under LGPL.
See Also:
CharsetProvider

Nested Class Summary
private  class SMS.PDUDestiller
           
private  class SMS.PDUInterpreter
           
 
Field Summary
private  int datacodingscheme
           
private  int messagereference
           
private  java.lang.String peerphonenumber
           
private  int peertypeofaddress
           
private  int protocolidentifier
           
static boolean SMS_RECEIVE
           
static boolean SMS_SUBMIT
           
private  java.lang.String smscphonenumber
           
private  int smsctypeofaddress
           
private  boolean submitmode
           
private  java.lang.String text
           
private  java.lang.String timestamp
           
private static int TP_MTI_MASK
           
static int TP_VP_ABSOLUTE
           
static int TP_VP_ENHANCED
           
static int TP_VP_NONE
           
static int TP_VP_RELATIVE
           
private static int TP_VPF_MASK
           
private  java.lang.String validitydate
           
private  int validityperiod
           
private  int validityperiodtype
           
 
Constructor Summary
SMS(java.lang.String pdu)
           
 
Method Summary
 int getDataCodingScheme()
           
 int getMessageReference()
           
 java.lang.String getPeerPhoneNumber()
           
 int getPeerTypeOfAddress()
           
 int getProtocolIdentifier()
           
 java.lang.String getSMSCPhoneNumber()
           
 int getSMSCTypeOfAddress()
           
 java.lang.String getText()
           
 java.lang.String getTimestamp()
           
 java.lang.String getValidityDate()
           
 int getValidityPeriod()
           
 int getValidityPeriodType()
           
 boolean isSubmitMode()
           
 void setDataCodingScheme(int datacodingscheme)
           
 void setMessageReference(int messagereference)
           
 void setPeerPhoneNumber(java.lang.String peerphonenumber)
           
 void setPeerTypeOfAddress(int peertypeofaddress)
           
 void setProtocolIdentifier(int protocolidentifier)
           
 void setSMSCPhoneNumber(java.lang.String smscphonenumber)
           
 void setSMSCTypeOfAddress(int smsctypeofaddress)
           
 void setSubmitMode(boolean submitmode)
           
 void setText(java.lang.String text)
           
 void setTimestamp(java.lang.String timestamp)
           
 void setValidityDate(java.lang.String validitydate)
           
 void setValidityPeriod(int validityperiod)
           
 void setValidityPeriodType(int validityperiodtype)
           
 java.lang.String toPDU()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SMS_SUBMIT

public static final boolean SMS_SUBMIT
See Also:
Constant Field Values

SMS_RECEIVE

public static final boolean SMS_RECEIVE
See Also:
Constant Field Values

TP_VP_NONE

public static final int TP_VP_NONE
See Also:
Constant Field Values

TP_VP_RELATIVE

public static final int TP_VP_RELATIVE
See Also:
Constant Field Values

TP_VP_ENHANCED

public static final int TP_VP_ENHANCED
See Also:
Constant Field Values

TP_VP_ABSOLUTE

public static final int TP_VP_ABSOLUTE
See Also:
Constant Field Values

TP_VPF_MASK

private static final int TP_VPF_MASK
See Also:
Constant Field Values

TP_MTI_MASK

private static final int TP_MTI_MASK
See Also:
Constant Field Values

submitmode

private boolean submitmode

validityperiodtype

private int validityperiodtype

messagereference

private int messagereference

protocolidentifier

private int protocolidentifier

datacodingscheme

private int datacodingscheme

timestamp

private java.lang.String timestamp

validitydate

private java.lang.String validitydate

validityperiod

private int validityperiod

smsctypeofaddress

private int smsctypeofaddress

smscphonenumber

private java.lang.String smscphonenumber

peertypeofaddress

private int peertypeofaddress

peerphonenumber

private java.lang.String peerphonenumber

text

private java.lang.String text
Constructor Detail

SMS

public SMS(java.lang.String pdu)
    throws java.io.UnsupportedEncodingException
Method Detail

getDataCodingScheme

public int getDataCodingScheme()

setDataCodingScheme

public void setDataCodingScheme(int datacodingscheme)

getMessageReference

public int getMessageReference()

setMessageReference

public void setMessageReference(int messagereference)

getPeerPhoneNumber

public java.lang.String getPeerPhoneNumber()

setPeerPhoneNumber

public void setPeerPhoneNumber(java.lang.String peerphonenumber)

getPeerTypeOfAddress

public int getPeerTypeOfAddress()

setPeerTypeOfAddress

public void setPeerTypeOfAddress(int peertypeofaddress)

getProtocolIdentifier

public int getProtocolIdentifier()

setProtocolIdentifier

public void setProtocolIdentifier(int protocolidentifier)

getSMSCPhoneNumber

public java.lang.String getSMSCPhoneNumber()

setSMSCPhoneNumber

public void setSMSCPhoneNumber(java.lang.String smscphonenumber)

getSMSCTypeOfAddress

public int getSMSCTypeOfAddress()

setSMSCTypeOfAddress

public void setSMSCTypeOfAddress(int smsctypeofaddress)

isSubmitMode

public boolean isSubmitMode()

setSubmitMode

public void setSubmitMode(boolean submitmode)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getTimestamp

public java.lang.String getTimestamp()

setTimestamp

public void setTimestamp(java.lang.String timestamp)

getValidityDate

public java.lang.String getValidityDate()

setValidityDate

public void setValidityDate(java.lang.String validitydate)

getValidityPeriod

public int getValidityPeriod()

setValidityPeriod

public void setValidityPeriod(int validityperiod)

getValidityPeriodType

public int getValidityPeriodType()

setValidityPeriodType

public void setValidityPeriodType(int validityperiodtype)

toString

public java.lang.String toString()

toPDU

public java.lang.String toPDU()
                       throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

QJCC homepage