unitee.client
Class SocketManager
java.lang.Object
|
+--unitee.client.SocketManager
- public class SocketManager
- extends java.lang.Object
Responsible to manage sockets used to invocate remote methods. The factory
tries to reuse already open connections that were "closed" by calling
destroySocket().
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SocketManager
public SocketManager(java.lang.String host)
throws java.io.IOException
SocketManager
public SocketManager(java.lang.String host,
int port)
throws java.io.IOException
createSocket
public java.net.Socket createSocket()
throws java.io.IOException
finalize
protected void finalize()
- Overrides:
- finalize in class java.lang.Object
closeSocket
public void closeSocket(java.net.Socket socket)
throws java.io.IOException
destructInstance
public static void destructInstance()
- Destructs the SocketManager instance and the associated sockets.
setInstance
public static void setInstance(SocketManager m)
getInstance
public static SocketManager getInstance()