org.wicketstuff.async.task
Class AbstractTaskContainer

java.lang.Object
  extended by org.wicketstuff.async.task.AbstractTaskContainer
All Implemented Interfaces:
Serializable, IDetachable, IClusterable

public abstract class AbstractTaskContainer
extends Object
implements Serializable, IDetachable

A serializable representation of a task that is hooked into a task manager.

Note: Never create a non-static inner subclass of this class within a custom implementation of a ITaskManager. A task manager is in general not serializable and this would therefore break the Wicket contract of a model this representation is based on.

See Also:
Serialized Form

Constructor Summary
protected AbstractTaskContainer(String id)
           
 
Method Summary
 void cancel()
           
 void detach()
           
 Throwable getExecutionError()
           
 String getId()
           
 Double getProgress()
           
 String getProgressMessage()
           
 boolean isCancelled()
           
 boolean isComplete()
           
 boolean isFailed()
           
 boolean isRunning()
           
 boolean isSubmitted()
           
protected abstract  ITaskManagerHook load()
           
 void submit(Runnable runnable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTaskContainer

protected AbstractTaskContainer(String id)
Method Detail

load

protected abstract ITaskManagerHook load()

getId

public String getId()

isSubmitted

public boolean isSubmitted()

isRunning

public boolean isRunning()

isComplete

public boolean isComplete()

isFailed

public boolean isFailed()

isCancelled

public boolean isCancelled()

getExecutionError

public Throwable getExecutionError()

submit

public void submit(Runnable runnable)

cancel

public void cancel()

getProgress

public Double getProgress()

getProgressMessage

public String getProgressMessage()

detach

public void detach()
Specified by:
detach in interface IDetachable


Copyright © 2013–2014 Kantega AS. All rights reserved.