org.apache.avalon.excalibur.thread.impl
Class WrappedThreadControl

java.lang.Object
  |
  +--org.apache.avalon.excalibur.thread.impl.WrappedThreadControl
All Implemented Interfaces:
ThreadControl

public class WrappedThreadControl
extends Object
implements ThreadControl

Author:
bloritsch To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments

Constructor Summary
WrappedThreadControl(ThreadControl control)
           
 
Method Summary
 Throwable getThrowable()
          Retrieve throwable that caused thread to cease execution.
 void interrupt()
          Call Thread.interrupt() on thread being controlled.
 boolean isFinished()
          Determine if thread has finished execution
 void join(long milliSeconds)
          Wait for specified time for thread to complete it's work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappedThreadControl

public WrappedThreadControl(ThreadControl control)
Method Detail

join

public void join(long milliSeconds)
          throws IllegalStateException,
                 InterruptedException
Description copied from interface: ThreadControl
Wait for specified time for thread to complete it's work.

Specified by:
join in interface ThreadControl
Parameters:
milliSeconds - the duration in milliseconds to wait until the thread has finished work
Throws:
InterruptedException - if another thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
IllegalStateException - if isValid() == false

interrupt

public void interrupt()
               throws IllegalStateException,
                      SecurityException
Description copied from interface: ThreadControl
Call Thread.interrupt() on thread being controlled.

Specified by:
interrupt in interface ThreadControl
Throws:
IllegalStateException - if isValid() == false
SecurityException - if caller does not have permission to call interupt()

isFinished

public boolean isFinished()
Description copied from interface: ThreadControl
Determine if thread has finished execution

Specified by:
isFinished in interface ThreadControl
Returns:
true if thread is finished, false otherwise

getThrowable

public Throwable getThrowable()
Description copied from interface: ThreadControl
Retrieve throwable that caused thread to cease execution. Only valid when true == isFinished()

Specified by:
getThrowable in interface ThreadControl
Returns:
the throwable that caused thread to finish execution


Copyright © 2000-2003 Apache Jakarta Project. All Rights Reserved.