|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.socket.SocketConnectionManagerDefaultImpl
public class SocketConnectionManagerDefaultImpl
A SocketConnectionManager
implementation that creates a new
socket for every call to the getSocket
method and closes the
socket passed to the releaseSocket
method.
Constructor Summary | |
---|---|
SocketConnectionManagerDefaultImpl()
Default constructor. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketConnectionManagerDefaultImpl()
Method Detail |
---|
public void init(XMLProperties xmlProps) throws SocketClientException
This implementation employs a SocketConfig
instance to
create socket connections.
init
in interface SocketConnectionManager
xmlProps
- XML configuration properties
SocketClientException
- if the manager cannot be initialised.public java.net.Socket getSocket() throws SocketClientException
getSocket
in interface SocketConnectionManager
SocketClientException
public void releaseSocket(java.net.Socket socket)
releaseSocket
in interface SocketConnectionManager
socket
- The socket instance to release.public void destroy()
destroy
in interface SocketConnectionManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |