org.jcreme.processing
Interface TaskActivityMonitor

All Known Implementing Classes:
BaseTaskActivityMonitor, RMITaskActivityMonitor

public interface TaskActivityMonitor

This interface describes an activity monitor. Objects of classes implementing this interface can then be used to display information about how the task is doing.

Version:
$Revision: 1.2 $
Author:
$Author: dbregeon $

Field Summary
static java.lang.String COMPLETION_PERCENTAGE_PROPERTY
          The name of the property for CompletionPercentage.
static java.lang.String END_DATE_PROPERTY
          The name of the property for EndDate.
static java.lang.String START_DATE_PROPERTY
          The name of the property for StartDate.
static java.lang.String TASK_NAME_PROPERTY
          The name of the property for TaskName.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 java.lang.Double getCompletionPercentage()
          Gives access to the completion percentage of the task.
 java.lang.Long getElapsedTime()
          Provides the elapsed time since the task started.
 java.util.Date getEndDate()
          Gives access to the task's completion date.
 java.util.Date getStartDate()
          Gives access to the date when the task started.
 java.lang.String getTaskName()
          Gives access to the task's name.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 

Field Detail

TASK_NAME_PROPERTY

public static final java.lang.String TASK_NAME_PROPERTY
The name of the property for TaskName.

See Also:
Constant Field Values

COMPLETION_PERCENTAGE_PROPERTY

public static final java.lang.String COMPLETION_PERCENTAGE_PROPERTY
The name of the property for CompletionPercentage.

See Also:
Constant Field Values

START_DATE_PROPERTY

public static final java.lang.String START_DATE_PROPERTY
The name of the property for StartDate.

See Also:
Constant Field Values

END_DATE_PROPERTY

public static final java.lang.String END_DATE_PROPERTY
The name of the property for EndDate.

See Also:
Constant Field Values
Method Detail

getTaskName

public java.lang.String getTaskName()
Gives access to the task's name.

Returns:
a name associated to the task.

getCompletionPercentage

public java.lang.Double getCompletionPercentage()
Gives access to the completion percentage of the task.

Returns:
A percentage of completion for the task.

getStartDate

public java.util.Date getStartDate()
Gives access to the date when the task started.

Returns:
the date when the task was started or null if the task has not started.

getEndDate

public java.util.Date getEndDate()
Gives access to the task's completion date.

Returns:
the date when the task was finished or null if the task is not finished.

getElapsedTime

public java.lang.Long getElapsedTime()
Provides the elapsed time since the task started.

Returns:
the difference between the start date and the end date. Null when the getStartDate method returns null. The difference between a newly created Date and the start date if the getEndDate method returns null and the getStartDate does not.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener - a property change listener as defined by the beans conventions. It should at least be reported any change to the following properties: completionPercentage, startDate, endDate.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Parameters:
propertyName - the name of a property that the listener has to monitor.
listener - a property change listener as defined by the beans conventions.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener - the listener that must be removed from the event diffusion list.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Parameters:
propertyName - the property for which changes won't be monitored anymore.
listener - the listener that must be removed from the event diffusion list for that property.


Copyright 2006 null. All Rights Reserved.