|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.conn.tsccm.RefQueueWorker
public class RefQueueWorker
A worker thread for processing queued references.
References 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.
| Field Summary | |
|---|---|
protected RefQueueHandler |
refHandler
The handler for the references found. |
protected java.lang.ref.ReferenceQueue<?> |
refQueue
The reference queue to monitor. |
protected java.lang.Thread |
workerThread
The thread executing this handler. |
| Constructor Summary | |
|---|---|
RefQueueWorker(java.lang.ref.ReferenceQueue<?> queue,
RefQueueHandler handler)
Instantiates a new worker to listen for lost connections. |
|
| Method Summary | |
|---|---|
void |
run()
The main loop of this worker. |
void |
shutdown()
Shuts down this worker. |
java.lang.String |
toString()
Obtains a description of this worker. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.ref.ReferenceQueue<?> refQueue
protected final RefQueueHandler refHandler
protected volatile java.lang.Thread workerThread
| Constructor Detail |
|---|
public RefQueueWorker(java.lang.ref.ReferenceQueue<?> queue,
RefQueueHandler handler)
queue - the queue on which to wait for referenceshandler - the handler to pass the references to| Method Detail |
|---|
public void run()
shutdown(). Only one thread can
execute the main loop at any time.
run in interface java.lang.Runnablepublic void shutdown()
run().
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||