java.lang.Object | |
↳ | org.apache.http.impl.conn.tsccm.RefQueueWorker |
A worker thread for processing queued references.
Reference
s can be
queued
automatically by the garbage collector.
If that feature is used, a daemon thread should be executing
this worker. It will pick up the queued references and pass them
on to a handler for appropriate processing.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
refHandler | The handler for the references found. | ||||||||||
refQueue | The reference queue to monitor. | ||||||||||
workerThread | The thread executing this handler. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Instantiates a new worker to listen for lost connections.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The main loop of this worker.
| |||||||||||
Shuts down this worker.
| |||||||||||
Obtains a description of this worker.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Runnable
|
The handler for the references found.
The thread executing this handler. This attribute is also used as a shutdown indicator.
Instantiates a new worker to listen for lost connections.
queue | the queue on which to wait for references |
---|---|
handler | the handler to pass the references to |
The main loop of this worker.
If initialization succeeds, this method will only return
after shutdown()
. Only one thread can
execute the main loop at any time.
Shuts down this worker.
It can be re-started afterwards by another call to run()
.
Obtains a description of this worker.