com.atlassian.bamboo.container
Class ThreadedTaskDaemon

java.lang.Object
  extended by com.atlassian.bamboo.container.ThreadedTaskDaemon
All Implemented Interfaces:
Startable, TaskDaemon

public class ThreadedTaskDaemon
extends Object
implements TaskDaemon

This class executes a given task in a single thread.


Constructor Summary
ThreadedTaskDaemon(BambooTask task, String threadName)
          Create a deamon to run the given task in a separate thread
 
Method Summary
 void killActiveTask()
          Stop the currently active task and restart the process in a new thread.
 void start()
          Start the deamon running
 void stop()
          Stop the task from executing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedTaskDaemon

public ThreadedTaskDaemon(BambooTask task,
                          String threadName)
Create a deamon to run the given task in a separate thread

Parameters:
task - The task to execute in the thread
Method Detail

start

public void start()
           throws Exception
Start the deamon running

Specified by:
start in interface Startable
Throws:
Exception - a generic error

stop

public void stop()
          throws Exception
Stop the task from executing

Specified by:
stop in interface Startable
Throws:
Exception - a generic failure

killActiveTask

public void killActiveTask()
                    throws Exception
Stop the currently active task and restart the process in a new thread.

Specified by:
killActiveTask in interface TaskDaemon
Throws:
Exception - A generic exception


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.