public class SccpAddressParser extends Object
Constructor and Description |
---|
SccpAddressParser() |
Modifier and Type | Method and Description |
---|---|
static String |
encodeSccpAddress(SccpAddress address)
Obtain a string value for an
SccpAddress . |
static SccpAddress |
parseSccpAddress(String addressString)
Parse an SCCP address string to return an
SccpAddress object
initialised to the values specified by the string. |
static String |
sccpNature(int nature)
Obtain a string value for an SCCP nature of address indicator.
|
static byte |
sccpNature(String nature)
Obtain a decimal value for an SCCP nature of address indicator.
|
static String |
sccpNumbering(int numbering)
Obtain a string value for an SCCP numbering plan.
|
static byte |
sccpNumbering(String numbering)
Obtain a decimal value for an SCCP numbering plan.
|
public static SccpAddress parseSccpAddress(String addressString)
SccpAddress
object
initialised to the values specified by the string.
The address string must be formatted as comma-seperated name/value pairs. The following parameters must be specified:
The following additional parameters may be specified as required:
If type=C7
has been specified, an x/y/z or x-y-z triple is taken to
mean the 3/8/3 bit fields of the zone/area/signal point address format.
If type=A7
or type=CH7
, an x/y/z triple is taken to mean
the 8/8/8 bit fields of the member/cluster/network address format, and an x-y-z triple
is taken to mean the 8/8/8 bit fields of the network-cluster-member address format.
(Note the differing orders of the network, cluster and member fields between the x/y/z
and x-y-z formats.) The integer value derived from the triple is in network byte order
according to the order in which the ANSI SCCP specification states that the member,
cluster and network components are transmitted: [00000000 MMMMMMMM CCCCCCCC NNNNNNNN].
It should be noted that this is the opposite order to that used by ANSI MTP.
When specifying global titles, the following rules apply:
digits
is specified.
nature
only is specified, a global title indicator of GT_0001 is used.
tt
only is specified, a global title indicator of GT_0010 is used.
numbering
and tt
are specified, a global title
indicator of GT_0011 is used.
nature
and either or both of numbering
and tt
are specified, a global title indicator of GT_0100 is used. If unspecified, the number
plan defaults to "unknown" and the translation type defaults to 0.
tt
only is specified, a global title indicator of GT_0010 is used.
tt
and numbering
is specified, a global title indicator
of GT_0001 is used.
Example address strings:
addressString
- the address string.IllegalArgumentException
- if an invalid option or value is specified.public static String encodeSccpAddress(SccpAddress address)
SccpAddress
. The value returned
from this method can be converted back into an SccpAddress
using
the parseSccpAddress(java.lang.String)
method.address
- the SCCP address.public static byte sccpNature(String nature)
nature
- the nature of address indicator expressed as a string value.
Valid values are "unknown", "international", "national", "subscriber",
or a decimal value in the range 0-15.IllegalArgumentException
- if an invalid value is specified.public static String sccpNature(int nature)
sccpNature(String)
method.nature
- the nature of address indicator.public static byte sccpNumbering(String numbering)
numbering
- the numbering plan expressed as a string value.
Valid values are "unknown", "isdn", "generic", "data", "telex", "maritime-mobile",
"land-mobile", "isdn-mobile", "private", or a decimal value in the range 0-15.IllegalArgumentException
- if an invalid value is specified.public static String sccpNumbering(int numbering)
sccpNumbering(String)
method.numbering
- the numbering plan.