com.ibm.etill.framework.io
Class SocketConnections
java.lang.Object
|
+--com.ibm.etill.framework.io.SocketConnections
- public final class SocketConnections
- extends Object
Class used to maintain and terminate socket connections
and cannot be subclasssed.
- See Also:
SocketConnections
public SocketConnections()
setComPoint
public static void setComPoint(ComPoint cp)
throws IOException
- Sets the Socket connection pool size. Must be called before the
initializePool method to be effective.
- Parameters:
an
- int that contains the connection pool size
setMaxSocketConnections
public static void setMaxSocketConnections(int max)
initializeConnection
public static void initializeConnection()
throws IOException
- Initializes the pool of Socket connections. Throws
IOException
if any errors occur.
- Throws:
IOException
- is thrown if a Socket error occurs.
getConnection
public static ETillConnection getConnection()
throws IOException
- Accesses a Socket connection from the pool of connections.
- Returns:
- a
Connection
object. - Throws:
IOException
- is thrown if a Socket error occurs.
releaseConnection
public static void releaseConnection()
- Returns a Socket connection to the pool of connections.
closeConnection
public static void closeConnection()
- Closes a Socket connection and throws
ETillFrameworkException
if a
IOException is encountered.
- Throws:
ETillFrameworkException
- is thrown if a IOException is caught.