javacli
Class ConnectionPool

java.lang.Object
  extended by javacli.ConnectionPool

public class ConnectionPool
extends java.lang.Object

Perform connection pooling


Constructor Summary
ConnectionPool()
           
 
Method Summary
 void close()
          Physically close all opened connections
 Connection newConnection(java.lang.String hostAddress, int hostPort)
          Make new pooled connection.
 void releaseConnection(Connection conxn)
          Return conection to the pool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPool

public ConnectionPool()
Method Detail

newConnection

public Connection newConnection(java.lang.String hostAddress,
                                int hostPort)
Make new pooled connection. If there is unused connection to this host with the same user name and password

Parameters:
hostAddress - string with server host name
hostPort - integer number with server port

releaseConnection

public void releaseConnection(Connection conxn)
Return conection to the pool

Parameters:
conxn - released connection

close

public void close()
Physically close all opened connections