jet.server.monitor.api.task
Interface TaskMonitor

All Superinterfaces:
Monitor

public interface TaskMonitor
extends Monitor

This TaskMonitor takes charge of managing all task/report's monitoring contents.


Method Summary
 java.util.Vector getAllFailedTasks()
          Gets all failed tasks.
 java.util.Vector getAllFinishedTasks()
          Gets all finished tasks currently saved in the Monitor Server.
 java.util.Vector getAllFinishedTasks(int timeLimit)
          Gets all tasks finished during the last N minutes, here N is an integer number.
 java.util.Vector getAllRunningTasks()
          Gets all running tasks at current time.
 java.util.Vector getAllTaskStatistics()
          Gets all task statistics at current time.
 java.util.Vector getAllWaitingTasks()
          Gets all waiting tasks at current time.
 java.util.Vector getFailedTasksByUser(java.lang.String userName)
          Gets all failed tasks submitted by the specified user.
 java.util.Vector getFinishedTasksByUser(java.lang.String userName)
          Gets all finished tasks submitted by the given user and currently saved in the Monitor Server.
 java.util.Vector getFinishedTasksByUser(java.lang.String userName, int timeLimit)
          Gets all tasks finished during the last N minutes submitted by the given user.
 java.util.Vector getRunningTasksByUser(java.lang.String userName)
          Gets all running tasks at current time submitted by the specified user.
 TaskInfo getTask(java.lang.String taskID)
          Gets a TaskInfo reference according to its task ID.
 TaskStatistic getTaskStatistic(java.lang.String reportName)
          Gets TaskStatistic by a specified report.
 java.util.Vector getWaitingTasksByUser(java.lang.String userName)
          Gets all currently waiting tasks submitted by the specified user.
 void killTask(TaskInfo taskInfo)
          Kills an unfinished task and related threads.
 void stopTask(TaskInfo taskInfo)
          Stops an unfinished task from continuing to run.
 
Methods inherited from interface jet.server.monitor.api.Monitor
getDuration, getInterval, isStarted, restart, setDuration, setInterval, start, stop, update
 

Method Detail

getAllRunningTasks

java.util.Vector getAllRunningTasks()
Gets all running tasks at current time.

Returns:
All running tasks in the whole monitored Report Server environment, wrap some TaskInfo instance.

getRunningTasksByUser

java.util.Vector getRunningTasksByUser(java.lang.String userName)
Gets all running tasks at current time submitted by the specified user.

Parameters:
userName, - The specified user name.
Returns:
All running tasks submitted by the specified user. wrap some TaskInfo instance.

getAllWaitingTasks

java.util.Vector getAllWaitingTasks()
Gets all waiting tasks at current time.

Returns:
All waiting tasks at current time. wrap some TaskInfo instance.

getWaitingTasksByUser

java.util.Vector getWaitingTasksByUser(java.lang.String userName)
Gets all currently waiting tasks submitted by the specified user.

Parameters:
userName, - The specified user name.
Returns:
All waiting tasks submitted by the user. wrap some TaskInfo instance.

getAllFinishedTasks

java.util.Vector getAllFinishedTasks()
Gets all finished tasks currently saved in the Monitor Server.

Returns:
All finished tasks currently saved.

getFinishedTasksByUser

java.util.Vector getFinishedTasksByUser(java.lang.String userName)
Gets all finished tasks submitted by the given user and currently saved in the Monitor Server.

Returns:
All finished tasks submitted by the given user.

getAllFinishedTasks

java.util.Vector getAllFinishedTasks(int timeLimit)
Gets all tasks finished during the last N minutes, here N is an integer number.

Parameters:
timeLimit, - Since a period of time in minutes to now.
Returns:
All tasks finished during the last N minutes. wrap some TaskInfo instance.

getFinishedTasksByUser

java.util.Vector getFinishedTasksByUser(java.lang.String userName,
                                        int timeLimit)
Gets all tasks finished during the last N minutes submitted by the given user. N is an integer number.

Parameters:
userName, - The specified user name.
timeLimit, - Since a period of time in minutes to now.
Returns:
All tasks finished during the last N minutes submitted by the given user. wrap some TaskInfo instance.

getAllFailedTasks

java.util.Vector getAllFailedTasks()
Gets all failed tasks.

Returns:
all failed tasks.

getFailedTasksByUser

java.util.Vector getFailedTasksByUser(java.lang.String userName)
Gets all failed tasks submitted by the specified user.

Parameters:
userName, - The specified user name.
Returns:
all failed tasks submitted by the specified user.

getTask

TaskInfo getTask(java.lang.String taskID)
Gets a TaskInfo reference according to its task ID.

Parameters:
taskID, - The given task ID.
Returns:
A TaskInfo reference according to its task ID.

stopTask

void stopTask(TaskInfo taskInfo)
Stops an unfinished task from continuing to run.

Parameters:
taskInfo, - The specified TaskInfo object.

killTask

void killTask(TaskInfo taskInfo)
Kills an unfinished task and related threads.

Parameters:
taskInfo, - The specified TaskInfo object. Notice, this method may result in JReport Server in an inconsistent state, so it is not recommended to call it in normal situations.

getAllTaskStatistics

java.util.Vector getAllTaskStatistics()
Gets all task statistics at current time.

Returns:
All task statistics in the whole monitored Report Server environment, wrap some TaskStatistic instance.
Since:
version 9

getTaskStatistic

TaskStatistic getTaskStatistic(java.lang.String reportName)
Gets TaskStatistic by a specified report.

Parameters:
reportName - the report name used to get TaskStatistic.
Returns:
TaskStatistic object for the specified report, or null if the TaskStatistic does not exist.
Since:
version 9