toolbox.socket
Interface SocketConnectionManager

Package class diagram package SocketConnectionManager
All Known Implementing Classes:
SocketConnectionManagerDefaultImpl, SocketConnectionManagerPoolImpl

public interface SocketConnectionManager

Interface to abstract the underlying mechanism of obtaining socket connections.


Method Summary
 void destroy()
          Destroy this connection manager.
 java.net.Socket getSocket()
          Return a reference to a socket connection.
 void init(XMLProperties xmlProps)
          Initialise the connection manager with the given XMLProperties.
 void releaseSocket(java.net.Socket socket)
          Release a reference to a socket.
 

Method Detail

init

void init(XMLProperties xmlProps)
          throws SocketClientException
Initialise the connection manager with the given XMLProperties. Implementations will initialise the mechanism for managing socket connections here.

Parameters:
xmlProps - XML configuration properties
Throws:
SocketClientException - if the manager cannot be initialised.

getSocket

java.net.Socket getSocket()
                          throws SocketClientException
Return a reference to a socket connection.

Returns:
Socket instance
Throws:
SocketClientException

releaseSocket

void releaseSocket(java.net.Socket socket)
Release a reference to a socket.

Parameters:
socket - The socket instance to release.

destroy

void destroy()
Destroy this connection manager.