NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.address
Class TelURLImpl

java.lang.Object
  |
  +--gov.nist.core.GenericObject
        |
        +--gov.nist.javax.sip.address.NetObject
              |
              +--gov.nist.javax.sip.address.GenericURI
                    |
                    +--gov.nist.javax.sip.address.TelURLImpl
All Implemented Interfaces:
Cloneable, Serializable, TelURL, URI

public class TelURLImpl
extends GenericURI
implements TelURL

Implementation of the TelURL interface.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
This code is in the public domain.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nist.javax.sip.address.GenericURI
ISUB, PHONE_CONTEXT_TAG, POSTDIAL, PROVIDER_TAG, SIP, SIPS, TEL
 
Constructor Summary
TelURLImpl()
          Creates a new instance of TelURLImpl
 
Method Summary
 String encode()
          Encode the URI.
 String getIsdnSubAddress()
          Returns the value of the isdnSubAddress parameter, or null if it is not set.
 String getPhoneNumber()
          Get the telephone number.
 String getPostDial()
          Returns the value of the postDial parameter, or null if it is not set.
 String getScheme()
          Returns the value of the "scheme" of this URI, for example "sip", "sips" or "tel".
 boolean isGlobal()
          Returns true if this TelURL is global i.e. if the TelURI has a global phone user.
 boolean isSipURI()
          This method determines if this is a URI with a scheme of "sip" or "sips".
 void setGlobal(boolean global)
          Sets phone user of this TelURL to be either global or local.
 void setIsdnSubAddress(String isdnSubAddress)
          Sets ISDN subaddress of this TelURL.
 void setPhoneNumber(String telephoneNumber)
          Set the telephone number.
 void setPostDial(String postDial)
          Sets post dial of this TelURL.
 void setTelephoneNumber(TelephoneNumber telephoneNumber)
          Set the telephone number.
 String toString()
          Return the string encoding.
 
Methods inherited from class gov.nist.javax.sip.address.GenericURI
clone
 
Methods inherited from class gov.nist.javax.sip.address.NetObject
debugDump, debugDump, equals, match, merge, replace, replace, replace, replace
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sip.address.URI
clone
 

Constructor Detail

TelURLImpl

public TelURLImpl()
Creates a new instance of TelURLImpl

Method Detail

setTelephoneNumber

public void setTelephoneNumber(TelephoneNumber telephoneNumber)
Set the telephone number.

Parameters:
telephoneNumber - -- telephone number to set.

getIsdnSubAddress

public String getIsdnSubAddress()
Returns the value of the isdnSubAddress parameter, or null if it is not set.

Specified by:
getIsdnSubAddress in interface TelURL
Returns:
the value of the isdnSubAddress parameter

getPostDial

public String getPostDial()
Returns the value of the postDial parameter, or null if it is not set.

Specified by:
getPostDial in interface TelURL
Returns:
the value of the postDial parameter

getScheme

public String getScheme()
Returns the value of the "scheme" of this URI, for example "sip", "sips" or "tel".

Specified by:
getScheme in interface URI
Overrides:
getScheme in class GenericURI
Returns:
the scheme paramter of the URI

isGlobal

public boolean isGlobal()
Returns true if this TelURL is global i.e. if the TelURI has a global phone user.

Specified by:
isGlobal in interface TelURL
Returns:
true if this TelURL represents a global phone user, and false otherwise.

isSipURI

public boolean isSipURI()
This method determines if this is a URI with a scheme of "sip" or "sips".

Specified by:
isSipURI in interface URI
Overrides:
isSipURI in class GenericURI
Returns:
true if the scheme is "sip" or "sips", false otherwise.

setGlobal

public void setGlobal(boolean global)
Sets phone user of this TelURL to be either global or local. The default value is false, hence the TelURL is defaulted to local.

Specified by:
setGlobal in interface TelURL
Parameters:
global - - the boolean value indicating if the TelURL has a global phone user.

setIsdnSubAddress

public void setIsdnSubAddress(String isdnSubAddress)
Sets ISDN subaddress of this TelURL. If a subaddress is present, it is appended to the phone number after ";isub=".

Specified by:
setIsdnSubAddress in interface TelURL
Parameters:
isdnSubAddress - - new value of the isdnSubAddress parameter

setPostDial

public void setPostDial(String postDial)
Sets post dial of this TelURL. The post-dial sequence describes what and when the local entity should send to the phone line.

Specified by:
setPostDial in interface TelURL
Parameters:
postDial - - new value of the postDial parameter

setPhoneNumber

public void setPhoneNumber(String telephoneNumber)
Set the telephone number.

Specified by:
setPhoneNumber in interface TelURL
Parameters:
telephoneNumber - - new value of the phoneNumber parameter

getPhoneNumber

public String getPhoneNumber()
Get the telephone number.

Specified by:
getPhoneNumber in interface TelURL
Returns:
-- the telephone number.

toString

public String toString()
Return the string encoding.

Specified by:
toString in interface TelURL
Overrides:
toString in class GenericURI
Returns:
-- the string encoding.

encode

public String encode()
Description copied from class: GenericURI
Encode the URI.

Overrides:
encode in class GenericURI
Returns:
The encoded URI

NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.