Class DefaultTypeOfAddressParser
- java.lang.Object
-
- com.github.mikesafonov.smpp.core.sender.DefaultTypeOfAddressParser
-
- All Implemented Interfaces:
TypeOfAddressParser
public class DefaultTypeOfAddressParser extends java.lang.Object implements TypeOfAddressParser
Default implementation ofTypeOfAddressParserinterface. Supports international and alphanumeric ton parameters, otherwise returnTon.UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DefaultTypeOfAddressParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull com.cloudhopper.commons.gsm.TypeOfAddressgetDestination(@NotNull java.lang.String destination)Create TON and NPI parameters for message destinationdestination.@NotNull com.cloudhopper.commons.gsm.TypeOfAddressgetSource(@NotNull java.lang.String source)Create TON and NPI parameters for message sourcesource.
-
-
-
Method Detail
-
getSource
@NotNull public @NotNull com.cloudhopper.commons.gsm.TypeOfAddress getSource(@NotNull @NotNull java.lang.String source)Create TON and NPI parameters for message sourcesource. Supported two types of source: international or alphanumeric, otherwise returnTon.UNKNOWN- Specified by:
getSourcein interfaceTypeOfAddressParser- Parameters:
source- message source- Returns:
- ton and npi for source
- Throws:
IllegalAddressException- if exception occurs
-
getDestination
@NotNull public @NotNull com.cloudhopper.commons.gsm.TypeOfAddress getDestination(@NotNull @NotNull java.lang.String destination)Create TON and NPI parameters for message destinationdestination. If number in international number format returnsTon.INTERNATIONAL, otherwise returnTon.UNKNOWN- Specified by:
getDestinationin interfaceTypeOfAddressParser- Parameters:
destination- message destination- Returns:
- ton and npi for destination
- Throws:
IllegalAddressException- if exception occurs
-
-