|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lastbamboo.common.sdp.GenericObject
org.lastbamboo.common.sdp.Host
public class Host
Stores hostname.
| Field Summary | |
|---|---|
protected int |
addressType
address field |
protected String |
hostname
hostName field |
protected static int |
HOSTNAME
|
protected static int |
IPV4ADDRESS
|
protected static int |
IPV6ADDRESS
|
| Fields inherited from class org.lastbamboo.common.sdp.GenericObject |
|---|
AND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, immutableClassNames, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentation |
| Constructor Summary | |
|---|---|
Host()
default constructor |
|
Host(String hostName)
Constructor given host name or IP address. |
|
Host(String name,
int addrType)
constructor |
|
| Method Summary | |
|---|---|
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 org.lastbamboo.common.sdp.GenericObject |
|---|
Assert, clone, dbgPrint, dbgPrint, debugDump, debugDump, getIndentation, getMatcher, isMySubclass, makeClone, match, merge, replace, replace, replace, replace, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int HOSTNAME
protected static final int IPV4ADDRESS
protected static final int IPV6ADDRESS
protected String hostname
protected int addressType
| Constructor Detail |
|---|
public Host()
public Host(String hostName)
throws IllegalArgumentException
IllegalArgumentException
public Host(String name,
int addrType)
name - String to setaddrType - int to set| Method Detail |
|---|
public String encode()
encode in class GenericObjectpublic boolean equals(Object obj)
equals in class GenericObjectobj - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||