Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit

ie.ncl.sms.smpp
Class Address

java.lang.Object
  extended by ie.ncl.sms.smpp.prot.Address
      extended by ie.ncl.sms.smpp.Address
All Implemented Interfaces:
Constants

public class Address
extends ie.ncl.sms.smpp.prot.Address
implements Constants

This class is used to create a short messaging address. When a short message is being send to short message entity (SME), such as a mobile station, an address must be specified.

The messaging address comprises of 3 parts; a Type of Number (TON), a Number Plan Indicator (NPI) and a handset number (the Mobile Station's Integrated Services Digital Network number - MSISDN).

It should be noted that the short messaging address is not limited to a mobile station. The address can be that of an extenal short message entity (ESME) such as a value added service application (e.g. SMS to E-mail gateway).


Field Summary
static short defaultNPI
          Deprecated. see getDefaultTon, setDefaultTon
static short defaultTON
          Deprecated. see getDefaultTon, setDefaultTon
 
Fields inherited from interface ie.ncl.sms.smpp.Constants
GSM_ASCII_MESSAGE_LENGTH, GSM_DCS_7BIT, GSM_DCS_8BIT, GSM_DCS_SIM, GSM_ERR_NONE, GSM_ERR_P_CUG, GSM_ERR_P_PROVISION, GSM_ERR_P_UNKNOWN, GSM_ERR_T_ABSENT, GSM_ERR_T_ABSENT_DETACHED, GSM_ERR_T_ABSENT_PAGEFAIL, GSM_ERR_T_BARRED, GSM_ERR_T_MEMCAP, GSM_ERR_T_MSERROR, GSM_ERR_T_MSSUPPORT, GSM_ERR_T_SUPPORT, GSM_ERR_T_SUPPORT_ROAMING, GSM_ERR_T_SYSTEM, GSM_NPI_E164, GSM_NPI_ERMES, GSM_NPI_ISDN, GSM_NPI_NATIONAL, GSM_NPI_PRIVATE, GSM_NPI_RESERVED_EXTN, GSM_NPI_TELEX, GSM_NPI_UNKNOWN, GSM_NPI_X121, GSM_OCTET_MESSAGE_LENGTH, GSM_PID_ERMES, GSM_PID_NORMAL, GSM_PID_PAGING_SYSTEM, GSM_PID_TELEFAX3, GSM_PID_TELEFAX4, GSM_PID_TELEX, GSM_PID_UCI, GSM_PID_VIDEOTEX, GSM_PID_VOICE, GSM_PID_X400_MHS, GSM_TON_ABBREVIATED, GSM_TON_ALPHANUMERIC, GSM_TON_INTERNATIONAL, GSM_TON_NATIONAL, GSM_TON_NETWORK, GSM_TON_RESERVED_EXTN, GSM_TON_SUBSCRIBER, GSM_TON_UNKNOWN, MAXIMUM_MESSAGE_LENGTH, STATUS_ACCEPTED, STATUS_DELETED, STATUS_DELIVERED, STATUS_ENROUTE, STATUS_EXPIRED, STATUS_INVALID, STATUS_UNDELIVERABLE
 
Constructor Summary
Address(int ton, int npi, java.lang.String msisdn)
           
Address(java.lang.String msisdn)
          This constructor creates a short messaging address which comprises of the short message entity number (such as the telephone number of a handset), and a default TON and NPI.
Address(java.lang.String number, int ton, int npi)
          This constructor creates a short messaging address which comprises of a Type Of Number (TON), a Number Plan Indicator (NPI) and the short message entity's number (such as the telephone number of a handset).
 
Method Summary
 boolean equals(Address a)
          This method tests equality of the short messaging address with another one.
static int getDefaultNpi()
          Alias for getDefaultNPI.
static int getDefaultNPI()
          Get the default NPI.
static int getDefaultTon()
          Alias for getDefaultTON.
static int getDefaultTON()
          Get the default Number Plan Indicator.
 java.lang.String getMSISDN()
          This method returns the MSISDN number field of the short messaging address.
 int getNPI()
          This method returns the Number Plan Indicator field of the short messaging address.
 java.lang.String getNumber()
          Alias for getMSISDN
 int getTON()
          This method returns the Type of Number field of the short messaging address.
static void setDefaultNpi(int npi)
          Alias for setDefaultNPI.
static void setDefaultNPI(int npi)
          Set the default NPI.
static void setDefaultTon(int ton)
          Alias for setDefaultTON.
static void setDefaultTON(int ton)
          Set the default Type of Number.
 java.lang.String toString()
           
 
Methods inherited from class ie.ncl.sms.smpp.prot.Address
getMsisdn, setMsisdn, setNPI, setTON
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultTON

public static short defaultTON
Deprecated. see getDefaultTon, setDefaultTon
The default Type of Number is initialised to GSM_TON_NATIONAL. Messaging address constructors that do not specity the TON use this as a default.

See Also:
Constants.GSM_TON_NATIONAL

defaultNPI

public static short defaultNPI
Deprecated. see getDefaultTon, setDefaultTon
The default Number Plan Indicator is initialised to GSM_NPI_E164. Messaging address constructors that do not specity the NPI use this as a default.

See Also:
Constants.GSM_NPI_E164
Constructor Detail

Address

public Address(java.lang.String number,
               int ton,
               int npi)
This constructor creates a short messaging address which comprises of a Type Of Number (TON), a Number Plan Indicator (NPI) and the short message entity's number (such as the telephone number of a handset). See the Message Constants Interface for a definition of the different TONs and NPIs.

Parameters:
number - The number of the short messaging entity
ton - The Type of Number
npi - The Number Plan Indicator
See Also:
Constants.GSM_TON_UNKNOWN, Constants.GSM_TON_INTERNATIONAL, Constants.GSM_TON_NATIONAL, Constants.GSM_TON_NETWORK, Constants.GSM_TON_SUBSCRIBER, Constants.GSM_TON_ALPHANUMERIC, Constants.GSM_TON_ABBREVIATED, Constants.GSM_TON_RESERVED_EXTN, Constants.GSM_NPI_UNKNOWN, Constants.GSM_NPI_E164, Constants.GSM_NPI_ISDN, Constants.GSM_NPI_X121, Constants.GSM_NPI_TELEX, Constants.GSM_NPI_NATIONAL, Constants.GSM_NPI_PRIVATE, Constants.GSM_NPI_ERMES, Constants.GSM_NPI_RESERVED_EXTN

Address

public Address(int ton,
               int npi,
               java.lang.String msisdn)

Address

public Address(java.lang.String msisdn)
This constructor creates a short messaging address which comprises of the short message entity number (such as the telephone number of a handset), and a default TON and NPI.

Parameters:
msisdn - SMS entity number
See Also:
defaultTON, defaultNPI
Method Detail

getDefaultTON

public static int getDefaultTON()
Get the default Number Plan Indicator. @see Constants


getDefaultTon

public static int getDefaultTon()
Alias for getDefaultTON.


setDefaultTON

public static void setDefaultTON(int ton)
Set the default Type of Number. @see Constants


setDefaultTon

public static void setDefaultTon(int ton)
Alias for setDefaultTON.


getDefaultNPI

public static int getDefaultNPI()
Get the default NPI. @see Constants


getDefaultNpi

public static int getDefaultNpi()
Alias for getDefaultNPI.


setDefaultNPI

public static void setDefaultNPI(int npi)
Set the default NPI. @see Constants


setDefaultNpi

public static void setDefaultNpi(int npi)
Alias for setDefaultNPI.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTON

public int getTON()
This method returns the Type of Number field of the short messaging address.

Overrides:
getTON in class ie.ncl.sms.smpp.prot.Address
See Also:
Constants

getNPI

public int getNPI()
This method returns the Number Plan Indicator field of the short messaging address.

Overrides:
getNPI in class ie.ncl.sms.smpp.prot.Address
See Also:
Constants

getMSISDN

public java.lang.String getMSISDN()
This method returns the MSISDN number field of the short messaging address.


getNumber

public java.lang.String getNumber()
Alias for getMSISDN


equals

public boolean equals(Address a)
This method tests equality of the short messaging address with another one.

Returns:
true if both are the same.

Experts in SMS and MMS Technology. NCLs Provato is an SMS/MMS Gateway supporting  WAP Push, EMS, MMS, SMS, Nokia Smart Messaging, SMPP, CIMD, UCP, MM7, M20, TC35 NCL Technologies Ltd
Provato - SMS MMS Gateway
Mobile Messaging in J2EE & .NET

SwiftNote - Java SMS Toolkit