Code example for InetSocketAddress

Methods: toString

0
	public int compareTo(DatabusServerCoordinates o)
	{ 
		InetSocketAddress addr1 = getAddress();
		InetSocketAddress addr2 = o.getAddress();
 
		String addrStr1 = (addr1 != null ? addr1.toString() + getState() : "");
		String addrStr2 = (addr2 != null ? addr2.toString() + getState() : "");
 
		return addrStr1.compareTo(addrStr2);
	} 
 
	/** 
	 * Check if the Server represented by this object is in ONLINE state 
	 * @return 
	 */ 
	public boolean isOnlineState() 
	{ 
		return _state == StateId.ONLINE;
	}