private class ConcurrentServerRunner.ClientWrapper extends java.lang.Object implements Client
Client responsible for ensuring that client
tracking is performed properly.| Constructor and Description |
|---|
ClientWrapper(T client) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes any resources that are held by the client.
|
void |
run() |
public ClientWrapper(T client)
public void run()
run in interface java.lang.Runnablepublic void close()
Client
Note that (as described in Doug Lea's discussion about interrupting I/O
operations in "Concurrent Programming in Java" (Addison-Wesley
Professional, 2nd edition, 1999) this method is used to interrupt
any blocked I/O operation in the client when the server is shutting
down. The client implementation must anticipate this potential,
and gracefully exit when the blocked I/O operation throws the
relevant IOException subclass.
Note also, that unlike Closeable.close() this method is not
permitted to propagate any IOException that occurs when closing
the underlying resource(s).