Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.server.progress.impl
Class ProgressImpl

java.lang.Object
  extended by eu.esdihumboldt.hale.server.progress.impl.ProgressImpl
All Implemented Interfaces:
Progress

public class ProgressImpl
extends Object
implements Progress

Progress implementation that represents a snapshot with no support for canceling.

Author:
Simon Templer

Constructor Summary
ProgressImpl(String taskName, String subTask, boolean indeterminate, int worked, int totalWork)
          Create a progress information object.
 
Method Summary
 void cancel()
          Cancel the job/task.
 String getSubTask()
           
 String getTaskName()
           
 int getTotalWork()
           
 int getWorked()
           
 boolean isCanceled()
           
 boolean isIndeterminate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressImpl

public ProgressImpl(String taskName,
                    String subTask,
                    boolean indeterminate,
                    int worked,
                    int totalWork)
Create a progress information object.

Parameters:
taskName - the task name, may be null
subTask - the sub task name, may be null
indeterminate - if the progress is indeterminate
worked - the number of worked work units
totalWork - the total work units
Method Detail

getTaskName

public String getTaskName()
Specified by:
getTaskName in interface Progress
Returns:
the task name, may be null

getSubTask

public String getSubTask()
Specified by:
getSubTask in interface Progress
Returns:
the name of the current subtask, may be null

isIndeterminate

public boolean isIndeterminate()
Specified by:
isIndeterminate in interface Progress
Returns:
if the progress is indeterminate

getWorked

public int getWorked()
Specified by:
getWorked in interface Progress
Returns:
the already worked work units, should be ignored if Progress.isIndeterminate() is true

getTotalWork

public int getTotalWork()
Specified by:
getTotalWork in interface Progress
Returns:
the total work units, should be ignored if Progress.isIndeterminate() is true

isCanceled

public boolean isCanceled()
Specified by:
isCanceled in interface Progress
Returns:
if the job/task is canceled
See Also:
Progress.isCanceled()

cancel

public void cancel()
Description copied from interface: Progress
Cancel the job/task. Behavior on cancel depends on the implementation of job/task.

Specified by:
cancel in interface Progress
See Also:
Progress.cancel()

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d