|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.address.NetObject
gov.nist.javax.sip.address.AddressImpl
public final class AddressImpl
Address structure. Imbeds a URI and adds a display name.
Field Summary | |
---|---|
static int |
ADDRESS_SPEC
constant field. |
static int |
NAME_ADDR
Constant field. |
static int |
WILD_CARD
Constant field. |
Constructor Summary | |
---|---|
AddressImpl()
|
Method Summary | |
---|---|
Object |
clone()
Clones this object. |
String |
encode()
Encode the address as a string and return it. |
StringBuffer |
encode(StringBuffer buffer)
Put the encoded version of this object in the given StringBuffer. |
boolean |
equals(Object other)
Compare two address specs for equality. |
int |
getAddressType()
Get the address type; |
String |
getDisplayName()
get the display name |
String |
getHost()
Get the host name from the address. |
gov.nist.core.HostPort |
getHostPort()
Get the host port portion of the address spec. |
int |
getPort()
Get the port from the imbedded URI. |
URI |
getURI()
Returns the URI address of this Address. |
String |
getUserAtHostPort()
Get the user@host:port for the address field. |
boolean |
hasDisplayName()
return true if DisplayName exist. |
int |
hashCode()
hashCode impelmentation |
boolean |
isSIPAddress()
Return true if the imbedded URI is a sip URI. |
boolean |
isWildcard()
This determines if this address is a wildcard address. |
boolean |
match(Object other)
Match on the address only. |
void |
removeDisplayName()
remove the displayName field |
void |
removeParameter(String parameterName)
Remove a parameter from the address. |
void |
setAddess(URI address)
Set the address field |
void |
setAddressType(int atype)
Set the address type. |
void |
setDisplayName(String displayName)
Set the displayName member |
void |
setURI(URI address)
Sets the URI address of this Address. |
void |
setUser(String user)
Set the user name for the imbedded URI. |
void |
setWildCardFlag()
Mark this a wild card address type. |
Methods inherited from class gov.nist.javax.sip.address.NetObject |
---|
debugDump, debugDump, toString |
Methods inherited from class gov.nist.core.GenericObject |
---|
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.sip.address.Address |
---|
toString |
Field Detail |
---|
public static final int NAME_ADDR
public static final int ADDRESS_SPEC
public static final int WILD_CARD
Constructor Detail |
---|
public AddressImpl()
Method Detail |
---|
public boolean match(Object other)
match
in class NetObject
other
- the match pattern to test against. The match object
has to be of the same type (class). Primitive types
and non-sip fields that are non null are matched for equality.
Null in any field matches anything. Some book-keeping fields
are ignored when making the comparison.
public gov.nist.core.HostPort getHostPort()
public int getPort()
public String getUserAtHostPort()
public String getHost()
public void removeParameter(String parameterName)
parameterName
- is the name of the parameter to remove.public String encode()
encode
in class gov.nist.core.GenericObject
public StringBuffer encode(StringBuffer buffer)
gov.nist.core.GenericObject
encode
in class gov.nist.core.GenericObject
public int getAddressType()
public void setAddressType(int atype)
atype
- int to setpublic String getDisplayName()
getDisplayName
in interface Address
public void setDisplayName(String displayName)
setDisplayName
in interface Address
displayName
- String to setpublic void setAddess(URI address)
address
- SipUri to setpublic int hashCode()
hashCode
in interface Address
hashCode
in class Object
public boolean equals(Object other)
equals
in interface Address
equals
in class NetObject
other
- Object to compare this this address
Object
public boolean hasDisplayName()
public void removeDisplayName()
public boolean isSIPAddress()
public URI getURI()
getURI
in interface Address
public boolean isWildcard()
Address.getAddress.getUserInfo() == *;
isWildcard
in interface Address
public void setURI(URI address)
setURI
in interface Address
address
- - the new URI address value of this NameAddress.public void setUser(String user)
user
- -- user name to set for the imbedded URI.public void setWildCardFlag()
public Object clone()
gov.nist.core.GenericObject
clone
in interface Address
clone
in class gov.nist.core.GenericObject
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |