dist1.acb.common.transport
Class InetAddressHelper

java.lang.Object
  extended bydist1.acb.common.transport.InetAddressHelper

public class InetAddressHelper
extends java.lang.Object

Provides some function for manipulating InetAddress

Version:
$Revision: 1.6 $
Author:
Alexander Stasiv

Method Summary
static java.net.InetAddress getByExtendedHostName(java.lang.String extendedHostName)
          Tries to build new InetAddress using host name, if fails buid uses only ip.
static java.net.InetAddress getByInetSocketAddress(java.net.InetSocketAddress addr)
          Tries to build new InetAddress using host name, if fails buid uses only ip.
static java.lang.String getExtendedHostName(java.net.InetAddress addr)
          Returns extended host name in format "host/ip".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getByExtendedHostName

public static java.net.InetAddress getByExtendedHostName(java.lang.String extendedHostName)
                                                  throws java.lang.IllegalArgumentException
Tries to build new InetAddress using host name, if fails buid uses only ip.

Parameters:
extendedHostName - extended host name in format "host/ip". For example: "asta.ait.gr/192.168.208.14"
Returns:
New InetAddress object
Throws:
java.lang.IllegalArgumentException - if format of extendedHostName is invalid

getByInetSocketAddress

public static java.net.InetAddress getByInetSocketAddress(java.net.InetSocketAddress addr)
Tries to build new InetAddress using host name, if fails buid uses only ip.

Parameters:
addr - An InetSocketAddress
Returns:
New InetAddress object

getExtendedHostName

public static java.lang.String getExtendedHostName(java.net.InetAddress addr)
Returns extended host name in format "host/ip". For example: "asta.ait.gr/192.168.208.14".

Parameters:
addr - An InetAddress
Returns:
return extended string represenattion of the InetAddress


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.