org.apache.http.impl.conn.tsccm
Class RefQueueWorker

java.lang.Object
  extended by org.apache.http.impl.conn.tsccm.RefQueueWorker
All Implemented Interfaces:
Runnable

Deprecated. do not use

@Deprecated
public class RefQueueWorker
extends Object
implements Runnable

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
          Deprecated. The handler for the references found.
protected  ReferenceQueue<?> refQueue
          Deprecated. The reference queue to monitor.
protected  Thread workerThread
          Deprecated. The thread executing this handler.
 
Constructor Summary
RefQueueWorker(ReferenceQueue<?> queue, RefQueueHandler handler)
          Deprecated. Instantiates a new worker to listen for lost connections.
 
Method Summary
 void run()
          Deprecated. The main loop of this worker.
 void shutdown()
          Deprecated. Shuts down this worker.
 String toString()
          Deprecated. 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

refQueue

protected final ReferenceQueue<?> refQueue
Deprecated. 
The reference queue to monitor.


refHandler

protected final RefQueueHandler refHandler
Deprecated. 
The handler for the references found.


workerThread

protected volatile Thread workerThread
Deprecated. 
The thread executing this handler. This attribute is also used as a shutdown indicator.

Constructor Detail

RefQueueWorker

public RefQueueWorker(ReferenceQueue<?> queue,
                      RefQueueHandler handler)
Deprecated. 
Instantiates a new worker to listen for lost connections.

Parameters:
queue - the queue on which to wait for references
handler - the handler to pass the references to
Method Detail

run

public void run()
Deprecated. 
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.

Specified by:
run in interface Runnable

shutdown

public void shutdown()
Deprecated. 
Shuts down this worker. It can be re-started afterwards by another call to run().


toString

public String toString()
Deprecated. 
Obtains a description of this worker.

Overrides:
toString in class Object
Returns:
a descriptive string for this worker


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.