|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.net.TCPAddress
public class TCPAddress
This class models a TCP "server address". This class encapsulates host and port information.
| Field Summary | |
|---|---|
protected java.lang.String |
_transportType
|
static java.lang.String |
TRANSPORT_TYPE
|
| Constructor Summary | |
|---|---|
TCPAddress()
Do not call; used for externalization only. |
|
TCPAddress(java.lang.String host,
int port)
Creates an instance of this class with the given host and port information. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Overrides equals; two host identifiers are equal if they have the same host and port. |
java.lang.String |
getHost()
Returns the address of the host to which this instance corresponds. |
int |
getPort()
Returns the port of the server to which this instance corresponds. |
java.lang.String |
getTransportType()
Returns the "transport type" of the server corresponding to this server address. |
int |
hashCode()
This method returns a hash code based on this instances host and port. |
void |
readExternal(java.io.ObjectInput in)
|
java.lang.String |
toString()
Returns a string representation of this instance. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TRANSPORT_TYPE
protected java.lang.String _transportType
| Constructor Detail |
|---|
public TCPAddress()
public TCPAddress(java.lang.String host,
int port)
host - the address of a host.port - the port of the server running on the given host.| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in interface ServerAddressequals in class java.lang.Objectobj - the instance with which to perform the comparison.Object.equals(Object obj).public java.lang.String getHost()
public int getPort()
public int hashCode()
hashCode in class java.lang.Objectint.
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionExternalizable.readExternal(ObjectInput)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionExternalizable.writeExternal(ObjectOutput)public java.lang.String getTransportType()
ServerAddress
getTransportType in interface ServerAddressString.ServerAddress.getTransportType()public java.lang.String toString()
toString in class java.lang.ObjectString.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||