se.unlogic.standardutils.threads
Class SimpleExecutionController<T extends TaskGroup>

java.lang.Object
  extended by se.unlogic.standardutils.threads.SimpleExecutionController<T>
All Implemented Interfaces:
ExecutionController<T>, Elementable, XMLable

@XMLElement(name="ExecutionController")
public class SimpleExecutionController<T extends TaskGroup>
extends java.lang.Object
implements ExecutionController<T>, Elementable


Constructor Summary
SimpleExecutionController(T taskGroup, ThreadPoolTaskGroupHandler<T> threadPoolTaskHandler)
           
 
Method Summary
 void abort()
           
 void awaitExecution()
           
 void awaitExecution(long timeout)
           
 int getCompletedTaskCount()
           
 int getInitialTaskCount()
           
 int getRemainingTaskCount()
           
 T getTaskGroup()
           
 boolean isAborted()
           
 boolean isFinished()
           
 boolean isStarted()
           
 void start()
           
 org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleExecutionController

public SimpleExecutionController(T taskGroup,
                                 ThreadPoolTaskGroupHandler<T> threadPoolTaskHandler)
Method Detail

abort

public void abort()
Specified by:
abort in interface ExecutionController<T extends TaskGroup>

awaitExecution

public void awaitExecution(long timeout)
                    throws java.lang.InterruptedException
Specified by:
awaitExecution in interface ExecutionController<T extends TaskGroup>
Throws:
java.lang.InterruptedException

awaitExecution

public void awaitExecution()
                    throws java.lang.InterruptedException
Specified by:
awaitExecution in interface ExecutionController<T extends TaskGroup>
Throws:
java.lang.InterruptedException

getRemainingTaskCount

public int getRemainingTaskCount()
Specified by:
getRemainingTaskCount in interface ExecutionController<T extends TaskGroup>

start

public void start()
Specified by:
start in interface ExecutionController<T extends TaskGroup>

getInitialTaskCount

public int getInitialTaskCount()

getCompletedTaskCount

public int getCompletedTaskCount()

isStarted

public boolean isStarted()
Specified by:
isStarted in interface ExecutionController<T extends TaskGroup>

isAborted

public boolean isAborted()
Specified by:
isAborted in interface ExecutionController<T extends TaskGroup>

isFinished

public boolean isFinished()
Specified by:
isFinished in interface ExecutionController<T extends TaskGroup>

getTaskGroup

public T getTaskGroup()
Specified by:
getTaskGroup in interface ExecutionController<T extends TaskGroup>

toXML

public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)
Specified by:
toXML in interface Elementable
Specified by:
toXML in interface XMLable


Copyright © 2011. All Rights Reserved.