com.isti.quakewatch.util
Class QWAbstractConnector.ServerHostInfo

java.lang.Object
  extended by com.isti.quakewatch.util.QWAbstractConnector.ServerHostInfo
Enclosing class:
QWAbstractConnector

protected static class QWAbstractConnector.ServerHostInfo
extends java.lang.Object

Class ServerHostInfo holds host address string and port number values and provides thread-safe methods for setting and fetching the values.


Constructor Summary
protected QWAbstractConnector.ServerHostInfo()
           
 
Method Summary
 java.lang.String getHostAddr()
          Returns the host address string.
 int getPortNum()
          Returns the host port number.
 java.lang.String getServerAddrPortString()
          Returns a string representation of the host address and port number.
 void setValues(java.lang.String hostAddr, int portNum)
          Sets the host values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QWAbstractConnector.ServerHostInfo

protected QWAbstractConnector.ServerHostInfo()
Method Detail

setValues

public void setValues(java.lang.String hostAddr,
                      int portNum)
Sets the host values.

Parameters:
hostAddr - the host address string.
portNum - the host port number string.

getHostAddr

public java.lang.String getHostAddr()
Returns the host address string.

Returns:
The host address string.

getPortNum

public int getPortNum()
Returns the host port number.

Returns:
The host port number.

getServerAddrPortString

public java.lang.String getServerAddrPortString()
Returns a string representation of the host address and port number.

Returns:
A string representation of the host address and port number in the form "addr:port", or an empty string if no host address is set.