org.jcreme.processing
Class RemoteTaskActivityMonitorImpl

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byorg.jcreme.processing.RemoteTaskActivityMonitorImpl
All Implemented Interfaces:
java.rmi.Remote, RemoteTaskActivityMonitor, java.io.Serializable

public class RemoteTaskActivityMonitorImpl
extends java.rmi.server.UnicastRemoteObject
implements RemoteTaskActivityMonitor

This is the implementation of the RemoteTaskActivityMonitor interface. It enables to remotely monuitor a task.

Version:
$Revision: 1.6 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Nested Class Summary
 class RemoteTaskActivityMonitorImpl.RMIListener
           
 
Nested classes inherited from class org.jcreme.processing.RemoteTaskActivityMonitor
RemoteTaskActivityMonitor.RemoteListener
 
Field Summary
(package private) static long serialVersionUID
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteTaskActivityMonitorImpl(TaskActivityMonitor actualMonitor)
          Creates new RemoteTaskActivityMonitorImpl
 
Method Summary
 void addPropertyChangeListener(RemoteTaskActivityMonitor.RemoteListener l)
          Enables to add a RemoteListener to this TaskActivityMonitor.
 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(RemoteTaskActivityMonitor.RemoteListener l)
          Enables to remove a RemoteListener to this TaskActivityMonitor.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

RemoteTaskActivityMonitorImpl

public RemoteTaskActivityMonitorImpl(TaskActivityMonitor actualMonitor)
                              throws java.lang.IllegalArgumentException,
                                     java.rmi.RemoteException
Creates new RemoteTaskActivityMonitorImpl

Parameters:
actualMonitor - the monitor that is actually plugged on the task.
Throws:
java.lang.IllegalArgumentException - if the actualMonitor is null.
java.rmi.RemoteException - if an error occurs during communication.
Method Detail

getEndDate

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

Specified by:
getEndDate in interface RemoteTaskActivityMonitor
Returns:
the date when the task was finished or null if the task is not finished.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

getTaskName

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

Specified by:
getTaskName in interface RemoteTaskActivityMonitor
Returns:
a name associated to the task.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

getElapsedTime

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

Specified by:
getElapsedTime in interface RemoteTaskActivityMonitor
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.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

getCompletionPercentage

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

Specified by:
getCompletionPercentage in interface RemoteTaskActivityMonitor
Returns:
A percentage of completion for the task.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

getStartDate

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

Specified by:
getStartDate in interface RemoteTaskActivityMonitor
Returns:
the date when the task was started or null if the task has not started.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

addPropertyChangeListener

public void addPropertyChangeListener(RemoteTaskActivityMonitor.RemoteListener l)
Enables to add a RemoteListener to this TaskActivityMonitor.

Specified by:
addPropertyChangeListener in interface RemoteTaskActivityMonitor
Parameters:
l - the RemoteListener that will listen to this TaskActivityMonitor.
Throws:
java.rmi.RemoteException - if an error occurs during communication.

removePropertyChangeListener

public void removePropertyChangeListener(RemoteTaskActivityMonitor.RemoteListener l)
Enables to remove a RemoteListener to this TaskActivityMonitor.

Specified by:
removePropertyChangeListener in interface RemoteTaskActivityMonitor
Parameters:
l - the RemoteListener that will listen to this TaskActivityMonitor.
Throws:
java.rmi.RemoteException - if an error occurs during communication.


Copyright 2006 null. All Rights Reserved.