FileDocCategorySizeDatePackage
WaitingThreadAborter.javaAPI DocAndroid 1.5 API2280Wed May 06 22:41:10 BST 2009org.apache.http.impl.conn.tsccm

WaitingThreadAborter

public class WaitingThreadAborter extends Object
A simple class that can interrupt a {@link WaitingThread}.

Fields Summary
private WaitingThread
waitingThread
private boolean
aborted
Constructors Summary
Methods Summary
public voidabort()
If a waiting thread has been set, interrupts it.

        aborted = true;
        
        if (waitingThread != null)
            waitingThread.interrupt();
        
    
public voidsetWaitingThread(org.apache.http.impl.conn.tsccm.WaitingThread waitingThread)
Sets the waiting thread. If this has already been aborted, the waiting thread is immediately interrupted.

param
waitingThread The thread to interrupt when aborting.

        this.waitingThread = waitingThread;
        if (aborted)
            waitingThread.interrupt();