org.jacorb.orb

Class IIOPAddress

Implemented Interfaces:
Configurable

public class IIOPAddress
extends java.lang.Object
implements Configurable

Version:
$Id: IIOPAddress.java,v 1.13 2004/05/06 12:40:00 nicolas Exp $

Author:
Andre Spiegel

Constructor Summary

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

Method Summary

void
configure(Configuration configuration)
boolean
equals(Object other)
String
getHostname()
Returns the host part of this IIOPAddress, as a DNS hostname.
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()
String
toString()

Constructor Details

IIOPAddress

public IIOPAddress(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 Details

configure

public void configure(Configuration configuration)
            throws ConfigurationException


equals

public boolean equals(Object other)


getHostname

public 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.


getIP

public 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.


getPort

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


hashCode

public int hashCode()


read

public static IIOPAddress read(InputStream in)


toCDR

public byte[] toCDR()


toString

public String toString()