NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.address
Class TelURLImpl

java.lang.Object
  extended bygov.nist.core.GenericObject
      extended bygov.nist.javax.sip.address.NetObject
          extended bygov.nist.javax.sip.address.GenericURI
              extended bygov.nist.javax.sip.address.TelURLImpl
All Implemented Interfaces:
Cloneable, Parameters, 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
 Object clone()
          Deep copy clone operation.
 String encode()
          Encode the URI.
 String getIsdnSubAddress()
          Returns the value of the isdnSubAddress parameter, or null if it is not set.
 String getParameter(String parameterName)
          Returns the value of the named parameter, or null if it is not set.
 Iterator getParameterNames()
          Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader.
 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 removeParameter(String name)
          Removes the specified parameter from Parameters of this ParametersHeader.
 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 setParameter(String name, String value)
          Sets the value of the specified parameter.
 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.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
 

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

clone

public Object clone()
Deep copy clone operation.

Specified by:
clone in interface URI
Overrides:
clone in class GenericURI
Returns:
-- a cloned version of this telephone number.

getParameter

public String getParameter(String parameterName)
Description copied from interface: Parameters
Returns the value of the named parameter, or null if it is not set. A zero-length String indicates flag parameter.

Specified by:
getParameter in interface Parameters
Returns:
the value of specified parameter

setParameter

public void setParameter(String name,
                         String value)
Description copied from interface: Parameters
Sets the value of the specified parameter. If the parameter already had a value it will be overwritten. A zero-length String indicates flag parameter.

Specified by:
setParameter in interface Parameters
Parameters:
name - - a String specifying the parameter name
value - - a String specifying the parameter value

getParameterNames

public Iterator getParameterNames()
Description copied from interface: Parameters
Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader.

Specified by:
getParameterNames in interface Parameters
Returns:
an Iterator over all the parameter names

removeParameter

public void removeParameter(String name)
Description copied from interface: Parameters
Removes the specified parameter from Parameters of this ParametersHeader. This method returns silently if the parameter is not part of the ParametersHeader.

Specified by:
removeParameter in interface Parameters
Parameters:
name - - a String specifying the parameter name

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.