|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.HostPort
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class HostPort
This class defines a data structure that combines an address and port number, as may be used to accept a connection from or initiate a connection to a remote system.
Constructor Summary | |
---|---|
HostPort(int port)
Creates a new HostPort object with the specified port
number but no host. |
|
HostPort(java.lang.String host,
int port)
Creates a new HostPort object with the specified port
number but no explicit host. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the provided Object is a HostPort object
with the same host name and port than this HostPort object. |
java.lang.String |
getHost()
Retrieves the host for this HostPort object. |
int |
getPort()
Retrieves the port number for this HostPort object. |
int |
hashCode()
Retrieves a hash code for this HostPort object. |
java.lang.String |
toString()
Retrieves a string representation of this HostPort
object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HostPort(int port)
HostPort
object with the specified port
number but no host.
port
- The port number for this HostPort
object.public HostPort(java.lang.String host, int port)
HostPort
object with the specified port
number but no explicit host.
host
- The host address or name for this HostPort
object, or null
if there is none.port
- The port number for this HostPort
object.Method Detail |
---|
public java.lang.String getHost()
HostPort
object.
HostPort
object, or
null
if none was provided.public int getPort()
HostPort
object.
HostPort
object.public java.lang.String toString()
HostPort
object. It will be the host element (or nothing if no host was
given) followed by a colon and the port number.
toString
in class java.lang.Object
HostPort
object.public boolean equals(java.lang.Object obj)
true
if the provided Object is a HostPort object
with the same host name and port than this HostPort object.
equals
in class java.lang.Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |