org.mobicents.servlet.sip.address
Class AddressImpl
java.lang.Object
org.mobicents.servlet.sip.address.ParameterableImpl
org.mobicents.servlet.sip.address.AddressImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Address, Parameterable
public class AddressImpl
- extends ParameterableImpl
- implements Address, java.io.Serializable
Implementation of Servlet Address specification.
- Author:
- mranga, bartek
- See Also:
- Serialized Form
|
Constructor Summary |
AddressImpl()
|
AddressImpl(javax.sip.address.Address address,
gov.nist.core.NameValueList parameters,
boolean isModifiable)
|
AddressImpl(gov.nist.javax.sip.header.AddressParametersHeader header,
boolean modifiable)
Creates instance of Address object. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
AddressImpl
public AddressImpl()
AddressImpl
public AddressImpl(javax.sip.address.Address address,
gov.nist.core.NameValueList parameters,
boolean isModifiable)
AddressImpl
public AddressImpl(gov.nist.javax.sip.header.AddressParametersHeader header,
boolean modifiable)
throws java.text.ParseException
- Creates instance of Address object. This object is valid representation
of SIP AddressHeader, like To, From, Contact. Input to create this object
HAS to be string that conforms to sip(s) uri schema. Methods exposed by
this object act on header part of address. Parameter methods modify
header parameters, not uri parameters.
- Parameters:
addressString - -
string representing header, it has to conform to rfc 3261
sip(s) uri scheme, see chapter 19 and specification of To/From
header.
Passed values must look like followin:
- <sip:ala@ma.kota>
- sip:ala@ma.kota
- <sip:ala@ma.kota;somePName=somePValue;someP2Name=V2>headerParam1=Value1;headerParam2=V2
- <sip:ala@ma.kota>headerParam1=Value1;headerParam2=V2
- "Kazik Staszewski"
<sip:ala@ma.kota;somePName=somePValue;someP2Name=V2>headerParam1=Value1;headerParam2=V2
- "Kazik Staszewski"
<sip:ala@ma.kota>headerParam1=Value1;headerParam2=V2
- Throws:
java.text.ParseException
getAddress
public javax.sip.address.Address getAddress()
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface Address
getExpires
public int getExpires()
- Specified by:
getExpires in interface Address
getQ
public float getQ()
- Specified by:
getQ in interface Address
getURI
public URI getURI()
- Specified by:
getURI in interface Address
isWildcard
public boolean isWildcard()
- Specified by:
isWildcard in interface Address
setDisplayName
public void setDisplayName(java.lang.String name)
- Specified by:
setDisplayName in interface Address
setExpires
public void setExpires(int seconds)
throws java.lang.IllegalArgumentException
- Specified by:
setExpires in interface Address
- Throws:
java.lang.IllegalArgumentException
setQ
public void setQ(float q)
- Specified by:
setQ in interface Address
setURI
public void setURI(URI uri)
- Specified by:
setURI in interface Address
clone
public java.lang.Object clone()
- Specified by:
clone in interface Address- Specified by:
clone in interface Parameterable- Specified by:
clone in class ParameterableImpl
toString
public java.lang.String toString()
- Specified by:
toString in interface Address- Overrides:
toString in class ParameterableImpl
getValue
public java.lang.String getValue()
- Specified by:
getValue in interface Parameterable
setValue
public void setValue(java.lang.String value)
- Specified by:
setValue in interface Parameterable
setAddress
public void setAddress(javax.sip.address.Address address)
setParameter
public void setParameter(java.lang.String name,
java.lang.String value)
- Specified by:
setParameter in interface Parameterable- Overrides:
setParameter in class ParameterableImpl
hashCode
public int hashCode()
- Overrides:
hashCode in class ParameterableImpl
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in interface Address- Specified by:
equals in interface Parameterable- Overrides:
equals in class ParameterableImpl
Copyright © 2009. All Rights Reserved.