public final class AddressImpl extends NetObject implements Address
Modifier and Type | Field and Description |
---|---|
protected GenericURI |
address
address field
|
static int |
ADDRESS_SPEC
constant field.
|
protected int |
addressType |
protected String |
displayName
displayName field
|
static int |
NAME_ADDR
Constant field.
|
static int |
WILD_CARD
Constant field.
|
CORE_PACKAGE, GRUU, LR, MADDR, METHOD, NET_PACKAGE, PARSER_PACKAGE, PHONE, SIP, SIPS, TCP, TLS, TRANSPORT, TTL, UDP, USER
AND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentation
Constructor and Description |
---|
AddressImpl() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this object.
|
String |
encode()
Encode the address as a string and return it.
|
StringBuilder |
encode(StringBuilder buffer)
Put the encoded version of this object in the given StringBuilder.
|
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.
|
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.
|
dbgPrint, dbgPrint, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint
public static final int NAME_ADDR
public static final int ADDRESS_SPEC
public static final int WILD_CARD
protected int addressType
protected String displayName
protected GenericURI address
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 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 GenericObject
public StringBuilder encode(StringBuilder buffer)
GenericObject
encode
in class 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()
public boolean equals(Object other)
public boolean hasDisplayName()
public void removeDisplayName()
public boolean isSIPAddress()
public URI getURI()
public boolean isWildcard()
Address.getAddress.getUserInfo() == *;
isWildcard
in interface Address
public void setURI(URI address)
public void setUser(String user)
user
- -- user name to set for the imbedded URI.public void setWildCardFlag()
public Object clone()
GenericObject
clone
in interface Address
clone
in class GenericObject
Copyright © 2018. All Rights Reserved.