twcsckernel.projectbase.rmi.socketfactory
Class EndpointInfo

java.lang.Object
  extended by twcsckernel.projectbase.rmi.socketfactory.EndpointInfo

public class EndpointInfo
extends java.lang.Object

Stores information about socket endpoint (address/port pair).

Author:
Tim Taylor -- tttaylor@cssassociates.com

Constructor Summary
EndpointInfo(java.lang.String host, int port)
          Constructor.
 
Method Summary
static java.lang.String getAddressString(byte[] address)
          Utility method to convert an IP address to a string.
static java.lang.String getEndpointString(byte[] address, int port)
          Utility method for creating an endpoint string of the form address:port.
static java.lang.String getEndpointString(java.lang.String address, int port)
          Utility method for creating an endpoint string of the form address:port.
 java.lang.String getHost()
           
 int getPort()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointInfo

public EndpointInfo(java.lang.String host,
                    int port)
Constructor.

Method Detail

getEndpointString

public static java.lang.String getEndpointString(java.lang.String address,
                                                 int port)
Utility method for creating an endpoint string of the form address:port.

Parameters:
address - The address part of the endpoint string.
port - The port part of the endpoint string.
Returns:
The endpoint string.

getEndpointString

public static java.lang.String getEndpointString(byte[] address,
                                                 int port)
Utility method for creating an endpoint string of the form address:port.

Parameters:
address - The address part of the endpoint string.
port - The port part of the endpoint string.
Returns:
The endpoint string.

getAddressString

public static java.lang.String getAddressString(byte[] address)
Utility method to convert an IP address to a string.

Parameters:
address - The four bytes of an IP address.
Returns:
The corresponding string (a.b.c.d format).

getHost

public java.lang.String getHost()
Returns:
host of this endpoint.

getPort

public int getPort()
Returns:
port of this endpoint.


Copyright © 2005-2006 CS@PUT. All Rights Reserved.