org.jboss.invocation.pooled.interfaces
Class ServerAddress

java.lang.Object
  extended by org.jboss.invocation.pooled.interfaces.ServerAddress
All Implemented Interfaces:
Serializable

public class ServerAddress
extends Object
implements Serializable

This class encapsulates all the required information for a client to establish a connection with the server. It also attempts to provide a fast hash() function since this object is used as a key in a hashmap mainted by the ConnectionManager.

Version:
$Revision: 1.4.6.5 $
Author:
Bill Burke, Scott.Stark@jboss.org
See Also:
Serialized Form

Field Summary
 String address
          Address of host to connect to
 SocketFactory clientSocketFactory
          An option socket factory for connecting to the server
 boolean enableTcpNoDelay
          If the TcpNoDelay option should be used on the socket.
 int port
          Port the service is listening on
 int timeout
          Timeout of setSoTimeout
 
Constructor Summary
ServerAddress(String address, int port, boolean enableTcpNoDelay, int timeout, SocketFactory clientSocketFactory)
          The server address/port representation.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

address

public String address
Address of host to connect to


port

public int port
Port the service is listening on


enableTcpNoDelay

public boolean enableTcpNoDelay
If the TcpNoDelay option should be used on the socket.


timeout

public int timeout
Timeout of setSoTimeout


clientSocketFactory

public SocketFactory clientSocketFactory
An option socket factory for connecting to the server

Constructor Detail

ServerAddress

public ServerAddress(String address,
                     int port,
                     boolean enableTcpNoDelay,
                     int timeout,
                     SocketFactory clientSocketFactory)
The server address/port representation.

Parameters:
address - - hostname/ip of the server
port - - the invoker port
enableTcpNoDelay - - the Socket.setTcpNoDelay flag
timeout - - the Socket.setSoTimeout value
clientSocketFactory - - optional SocketFactory
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.