Version

Address

public class Address
Extends: java.lang.Object
Address represents the source or destination address field in an SMPP PDU. It includes the TON (Type of Number), NPI (Numbering Plan Indicator), and the actual address string (like a phone number or short code). This class is used throughout the protocol in PDUs such as SubmitSm, DeliverSm, and QuerySm.

Constructor:

public Address()
Initializes an empty address. Fields can be filled manually using setters.

public Address    (byte ton, byte npi, String address)
    ton – Type of Number (e.g. international, alphanumeric, etc.).
    npi – Numbering Plan Indicator (e.g. ISDN, national, etc.).
    address – The actual address string, such as a phone number.
Creates a new address with the specified TON, NPI, and address value.

Methods:

byte getTon() Returns the Type of Number (TON).
void setTon(byte value) Sets the Type of Number.
byte getNpi() Returns the Numbering Plan Indicator (NPI).
void setNpi(byte value) Sets the Numbering Plan Indicator.
String getAddress() Returns the address string (e.g., phone number).
void setAddress(String value) Sets the address string.
int calculateByteSize() Returns the total byte size of this address when serialized.
void read(ByteBuf buffer)

Deserializes the address from a Netty buffer.

Throws UnrecoverablePduException or RecoverablePduException.

void write(ByteBuf buffer)

Serializes the address into a Netty buffer.

Throws UnrecoverablePduException or RecoverablePduException.

String toString()

Returns a readable representation of the address.

Overrides Object.toString().

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com