|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.auxiliary.lateral.socket.tcp.utils.SocketOpener
public class SocketOpener
Since 1.4, we can specify the timeout in the connect block, we no longer need the extra thread to join against the Socket creation.
Constructor Summary | |
---|---|
SocketOpener(String host,
int port,
int timeout)
Constructor for the SocketOpener object |
Method Summary | |
---|---|
Socket |
getSocket()
|
static Socket |
openSocket(String host,
int port,
int timeOut)
Opens a socket with a connection timeout value. |
void |
run()
Main processing method for the SocketOpener object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SocketOpener(String host, int port, int timeout)
host
- port
- timeout
- connect timeoutMethod Detail |
---|
public static Socket openSocket(String host, int port, int timeOut)
host
- port
- timeOut
-
public void run()
run
in interface Runnable
public Socket getSocket()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |