|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanbikel.util.TimeoutSocketFactory
public class TimeoutSocketFactory
Delivers sockets with timeout values (set via
Socket.setSoTimeout). In the case of
createServerSocket, the ServerSocket
returned is of type TimeoutServerSocket, which
delivers sockets via its implementation of accept with
the specified server-side timeout value.
Socket.setSoTimeout(int),
Serialized Form| Constructor Summary | |
|---|---|
TimeoutSocketFactory(int clientTimeout,
int serverTimeout)
Constructs a new TimeoutSocketFactory with the
specified timeout values for server and client sockets. |
|
| Method Summary | |
|---|---|
ServerSocket |
createServerSocket(int port)
Returns a TimeoutServerSocket constructed with the
serverTimeout value specified at construction of
this factory and with the specified port. |
Socket |
createSocket(String host,
int port)
Returns a Socket object created on the specified
host and port, having set its timeout value to the
clientTimeout value specified at construction of
this factory. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
void |
setTimeout(int clientTimeout,
int serverTimeout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeoutSocketFactory(int clientTimeout,
int serverTimeout)
TimeoutSocketFactory with the
specified timeout values for server and client sockets.
clientTimeout - the timeout value to be set for client-side sockets;
a value of 0 indicates an infinite timeoutserverTimeout - the timeout value to be set for server-side sockets;
a value of 0 indicates an infinite timeout
IllegalArgumentException - if either clientTimeout
or serverTimeout is less than 0| Method Detail |
|---|
public ServerSocket createServerSocket(int port)
throws IOException
TimeoutServerSocket constructed with the
serverTimeout value specified at construction of
this factory and with the specified port. A
TimeoutServerSocket delivers sockets via its
implementation of accept with the specified
server-side timeout value.
createServerSocket in interface RMIServerSocketFactoryIOExceptionTimeoutServerSocket,
TimeoutServerSocket.accept()
public Socket createSocket(String host,
int port)
throws IOException
Socket object created on the specified
host and port, having set its timeout value to the
clientTimeout value specified at construction of
this factory.
createSocket in interface RMIClientSocketFactoryIOExceptionSocket.setSoTimeout(int)
public void setTimeout(int clientTimeout,
int serverTimeout)
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||