org.jcreme.processing
Class RMITaskActivityMonitor

java.lang.Object
  extended byorg.jcreme.processing.BaseTaskActivityMonitor
      extended byorg.jcreme.processing.RMITaskActivityMonitor
All Implemented Interfaces:
TaskActivityMonitor

public class RMITaskActivityMonitor
extends BaseTaskActivityMonitor
implements TaskActivityMonitor

This class enables to encapsulate a RemoteTaskActivityMonitor and use it as any TaskActivityMonitor.

Version:
$Revision: 1.6 $
Author:
$Author: dbregeon $

Nested Class Summary
 class RMITaskActivityMonitor.RemoteListenerImpl
          The RemoteListener implementation used by the RMITaskActivityMonitor.
 
Field Summary
 
Fields inherited from interface org.jcreme.processing.TaskActivityMonitor
COMPLETION_PERCENTAGE_PROPERTY, END_DATE_PROPERTY, START_DATE_PROPERTY, TASK_NAME_PROPERTY
 
Constructor Summary
RMITaskActivityMonitor(RemoteTaskActivityMonitor monitor)
          Creates new RMITaskActivityMonitor
 
Method Summary
protected  void finalize()
           
 java.lang.Double getCompletionPercentage()
          Gives access to the completion percentage of the task.
 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 unbind()
          This method unregisters this object as a listener of the RemoteTaskActivityMonitor.
 
Methods inherited from class org.jcreme.processing.BaseTaskActivityMonitor
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getElapsedTime, removePropertyChangeListener, removePropertyChangeListener, setCompletionPercentage, setEndDate, setStartDate, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jcreme.processing.TaskActivityMonitor
addPropertyChangeListener, addPropertyChangeListener, getElapsedTime, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

RMITaskActivityMonitor

public RMITaskActivityMonitor(RemoteTaskActivityMonitor monitor)
                       throws java.lang.IllegalArgumentException
Creates new RMITaskActivityMonitor

Parameters:
monitor - the remote monitor to encapulate.
Throws:
java.lang.IllegalArgumentException - if the monitor is null.
Method Detail

getEndDate

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

Specified by:
getEndDate in interface TaskActivityMonitor
Overrides:
getEndDate in class BaseTaskActivityMonitor
Returns:
the date when the task was finished or null if the task is not finished.

getTaskName

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

Specified by:
getTaskName in interface TaskActivityMonitor
Overrides:
getTaskName in class BaseTaskActivityMonitor
Returns:
a name associated to the task.

getCompletionPercentage

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

Specified by:
getCompletionPercentage in interface TaskActivityMonitor
Overrides:
getCompletionPercentage in class BaseTaskActivityMonitor
Returns:
A percentage of completion for the task.

getStartDate

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

Specified by:
getStartDate in interface TaskActivityMonitor
Overrides:
getStartDate in class BaseTaskActivityMonitor
Returns:
the date when the task was started or null if the task has not started.

unbind

public void unbind()
This method unregisters this object as a listener of the RemoteTaskActivityMonitor. This needs to be called when this Object becomes unavailable to avoid connection attempts from the RemoteTaskActivityMonitor when a PropertyChangeEvent is fired.


finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable
See Also:
Object.finalize()


Copyright 2006 null. All Rights Reserved.