org.jacorb.orb
Class IIOPAddress

java.lang.Object
  extended byorg.jacorb.orb.IIOPAddress

public class IIOPAddress
extends java.lang.Object

Version:
$Id: IIOPAddress.java,v 1.11 2004/02/13 08:46:49 simon.mcqueen Exp $
Author:
Andre Spiegel

Constructor Summary
IIOPAddress(java.lang.String host, int port)
          Creates a new IIOPAddress for host and port.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String getHostname()
          Returns the host part of this IIOPAddress, as a DNS hostname.
 java.lang.String getIP()
          Returns the host part of this IIOPAddress, as a numeric IP address in dotted decimal form.
 int getPort()
          Returns the port number of this address, represented as an integer in the range 0..65535.
 int hashCode()
           
static IIOPAddress read(InputStream in)
           
 byte[] toCDR()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IIOPAddress

public IIOPAddress(java.lang.String host,
                   int port)
Creates a new IIOPAddress for host and port.

Parameters:
host - either a DNS name, or a textual representation of a numeric IP address (dotted decimal)
port - the port number represented as an integer, in the range 0..65535. As a special convenience, a negative number is converted by adding 65536 to it; this helps using values that were previously stored in a Java short.
Method Detail

read

public static IIOPAddress read(InputStream in)

getIP

public java.lang.String getIP()
Returns the host part of this IIOPAddress, as a numeric IP address in dotted decimal form. If the numeric IP address was specified when this object was created, then that address is returned. Otherwise, this method performs a DNS lookup on the hostname.


getHostname

public java.lang.String getHostname()
Returns the host part of this IIOPAddress, as a DNS hostname. If the DNS name was specified when this IIOPAddress was created, then that name is returned. Otherwise, this method performs a reverse DNS lookup on the IP address.


getPort

public int getPort()
Returns the port number of this address, represented as an integer in the range 0..65535.


equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

toString

public java.lang.String toString()

toCDR

public byte[] toCDR()