|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.core.GenericObject | +--gov.nist.core.Host
Stores hostname.
Constructor Summary | |
Host()
default constructor |
|
Host(String hostName)
Constructor given host name or IP address. |
|
Host(String name,
int addrType)
constructor |
Method Summary | |
Object |
clone()
Make a clone of this object. |
String |
encode()
Return the host name in encoded form. |
boolean |
equals(Object obj)
Compare for equality of hosts. |
String |
getAddress()
get the Address field |
String |
getHostname()
get the HostName field |
InetAddress |
getInetAddress()
Get the inet address from this host. |
String |
getIpAddress()
Convenience function to get the raw IP destination address of a SIP message as a String. |
boolean |
isHostname()
Return true if the address is a DNS host name (and not an IPV4 address) |
boolean |
isIPAddress()
Return true if the address is a DNS host name (and not an IPV4 address) |
void |
setAddress(String address)
Set the address member |
void |
setHostAddress(String address)
Set the IP Address. |
void |
setHostname(String h)
Set the hostname member. |
Methods inherited from class gov.nist.core.GenericObject |
debugDump, debugDump, getClassFromName, getMatcher, isMySubclass, match, merge, replace, replace, replace, replace, setMatcher |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Host()
public Host(String hostName) throws IllegalArgumentException
public Host(String name, int addrType)
name
- String to setaddrType
- int to setMethod Detail |
public String encode()
encode
in class GenericObject
public boolean equals(Object obj)
equals
in class GenericObject
obj
- Object to set
public String getHostname()
public String getAddress()
public String getIpAddress()
public void setHostname(String h)
h
- String to setpublic void setHostAddress(String address)
address
- is the address string to set.public void setAddress(String address)
address
- address String to setpublic boolean isHostname()
public boolean isIPAddress()
public InetAddress getInetAddress() throws UnknownHostException
UnkownHostexception
- when the host name cannot be resolved.
UnknownHostException
public Object clone()
GenericObject
clone
in class GenericObject
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |