|
||||||||||
| 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.HostPort
public final class HostPort
Holds the hostname:port.
| Field Summary | |
|---|---|
protected Host |
host
host field |
protected int |
port
port field |
| 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 | |
|---|---|
HostPort()
Default constructor |
|
| Method Summary | |
|---|---|
Object |
clone()
Clones this object. |
String |
encode()
Encode this hostport into its string representation. |
boolean |
equals(Object other)
returns true if the two objects are equals, false otherwise. |
Host |
getHost()
get the Host field |
InetAddress |
getInetAddress()
Return the internet address corresponding to the host. |
int |
getPort()
get the port field |
boolean |
hasPort()
Returns boolean value indicating if Header has port |
void |
merge(Object mergeObject)
Recursively override the fields of this object with the fields of a new object. |
void |
removePort()
remove port. |
void |
setHost(Host h)
Set the host member |
void |
setPort(int p)
Set the port member |
String |
toString()
|
| Methods inherited from class org.lastbamboo.common.sdp.GenericObject |
|---|
Assert, dbgPrint, dbgPrint, debugDump, debugDump, getIndentation, getMatcher, isMySubclass, makeClone, match, 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, wait, wait, wait |
| Field Detail |
|---|
protected Host host
protected int port
| Constructor Detail |
|---|
public HostPort()
| Method Detail |
|---|
public String encode()
encode in class GenericObjectpublic boolean equals(Object other)
equals in class GenericObjectother - Object to set
public Host getHost()
public int getPort()
public boolean hasPort()
public void removePort()
public void setHost(Host h)
h - Host to setpublic void setPort(int p)
p - int to set
public InetAddress getInetAddress()
throws UnknownHostException
java.net.UnkownHostException - if host name cannot be resolved.
UnknownHostExceptionpublic void merge(Object mergeObject)
GenericObject
merge in class GenericObjectmergeObject - is the replacement object. The override
obect must be of the same class as this object.
Set any fields that you do not want to override as null in the
mergeOject object.public Object clone()
GenericObject
clone in class GenericObjectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||