jet.server.api.profiling
Interface TaskAuditor


public interface TaskAuditor

TaskAuditor is the subsystem in JReport Server. Which supply the ability that records the relative events with tasks, including submitting a task, a task start running, a task finished and a task failed. And all the records can be get with task status condition and time condition for analyzing later.


Method Summary
 void addTaskCatalog(java.lang.String taskID, java.lang.String catalogName)
          Add catalog for the specified task.
 java.lang.String generateTaskID()
          Generate an ID for a specified task.
 java.util.List<AuditTaskRecord> getAllAuditTasks()
          Gets all audit task records stored in audit subsystem.
 java.util.List<AuditTaskRecord> getAllAuditTasks(long beginTime, long endTime)
          Gets the audit task records which met the specified time condition stored in audit subsystem.
 java.util.List<AuditTaskRecord> getFailedAuditTasks()
          Gets all audit task records whose status was "Failed" stored in audit subsystem.
 java.util.List<AuditTaskRecord> getFailedAuditTasks(long beginTime, long endTime)
          Gets all audit task records whose status was "Failed" and met the specified time condition stored in audit subsystem.
 java.util.List<AuditTaskRecord> getFinishedAuditTasks()
          Gets all audit task records whose status was "Finished" stored in audit subsystem.
 java.util.List<AuditTaskRecord> getFinishedAuditTasks(long beginTime, long endTime)
          Gets all audit task records whose status was "Finished" and met the specified time condition stored in audit subsystem.
 java.util.List<AuditTaskRecord> getRunningAuditTasks()
          Gets all audit task records whose status was "Running" stored in audit subsystem.
 java.util.List<AuditTaskRecord> getRunningAuditTasks(long beginTime, long endTime)
          Gets all audit task records whose status was "Running" and met the specified time condition stored in audit subsystem.
 java.util.List<AuditTaskRecord> getWaitingAuditTasks()
          Gets all audit task records whose status was "Waiting" stored in audit subsystem.
 java.util.List<AuditTaskRecord> getWaitingAuditTasks(long beginTime, long endTime)
          Gets all audit task records whose status was "Waiting" and met the specified time condition stored in audit subsystem.
 void refreshParametersFinished(java.lang.String taskID, long finishTime)
          Notice the auditor the refreshing finished.
 void refreshParametersStarted(java.lang.String taskID, long startTime)
          Notice the auditor start refreshing the report data after changing parameters.
 void setTaskCatalog(java.lang.String taskID, java.lang.String catalogName)
          Set the catalog name of the specified task.
 void setTaskReport(java.lang.String taskID, java.lang.String reportName)
          Set the report name of the specified task.
 void taskFailed(java.lang.String taskID, long completeTime, java.lang.String failReason)
          Notice the auditor the specified task had failed.
 void taskFinished(java.lang.String taskID, long completeTime, int reportPages)
          Notice the auditor the specified task had finished.
 void taskParametersChanged(java.lang.String taskID, long changeTime, int reportPages, java.util.Map parameters)
          Notice the auditor the parameters of the specified task has changed.
 void taskStarted(java.lang.String taskID, long startRunTime)
          Notice the auditor the specified task start running.
 void taskSubmitted(java.lang.String taskID, int taskType, long submitTime, java.lang.String user, java.util.Map parameters)
          Notice the auditor there is an new submitted task when a task was submitted to JReport Server.
 

Method Detail

generateTaskID

java.lang.String generateTaskID()
Generate an ID for a specified task.

Returns:
An String, which is the ID of the specified task.

taskSubmitted

void taskSubmitted(java.lang.String taskID,
                   int taskType,
                   long submitTime,
                   java.lang.String user,
                   java.util.Map parameters)
Notice the auditor there is an new submitted task when a task was submitted to JReport Server.

Parameters:
taskID - The ID of submitted task.
taskType - The type of submitted task.
submitTime - The submit time of task.
user - The user name who submit the task.
parameters - The parameters which was used when the submitted task run.

taskStarted

void taskStarted(java.lang.String taskID,
                 long startRunTime)
Notice the auditor the specified task start running.

Parameters:
taskID - The ID of task which start running.
startRunTime - The start time of the task.

setTaskReport

void setTaskReport(java.lang.String taskID,
                   java.lang.String reportName)
Set the report name of the specified task.

Parameters:
taskID - The ID of the task which you want to set its report name.
reportName - The name of the new report.

setTaskCatalog

void setTaskCatalog(java.lang.String taskID,
                    java.lang.String catalogName)
Set the catalog name of the specified task.

Parameters:
taskID - The ID of the task which you want to set its catalog name.
catalogName - The name of the new catalog.

addTaskCatalog

void addTaskCatalog(java.lang.String taskID,
                    java.lang.String catalogName)
Add catalog for the specified task.

Parameters:
taskID - The ID of the task which you want to add catalog.
catalogName - The name of the added catalog.

taskParametersChanged

void taskParametersChanged(java.lang.String taskID,
                           long changeTime,
                           int reportPages,
                           java.util.Map parameters)
Notice the auditor the parameters of the specified task has changed.

Parameters:
taskID - The ID of the task whose parameters had changed.
changeTime - The change time of parameters.
reportPages - The pages number shown to user before the parameters changing.
parameters - The parameters changed.

refreshParametersStarted

void refreshParametersStarted(java.lang.String taskID,
                              long startTime)
Notice the auditor start refreshing the report data after changing parameters.

Parameters:
taskID - The ID of the task which start refreshing report data.
startTime - The refreshing start time.

refreshParametersFinished

void refreshParametersFinished(java.lang.String taskID,
                               long finishTime)
Notice the auditor the refreshing finished.

Parameters:
taskID - The ID of the task which finish the refreshing.
finishTime - The refreshing finish time.

taskFinished

void taskFinished(java.lang.String taskID,
                  long completeTime,
                  int reportPages)
Notice the auditor the specified task had finished.

Parameters:
taskID - The ID of the specified task.
completeTime - The finished time.
reportPages - The pages number shown to user when the task finished.

taskFailed

void taskFailed(java.lang.String taskID,
                long completeTime,
                java.lang.String failReason)
Notice the auditor the specified task had failed.

Parameters:
taskID - The ID of the specified task.
completeTime - The failed time.
failReason - The reason caused the task failed.

getAllAuditTasks

java.util.List<AuditTaskRecord> getAllAuditTasks()
Gets all audit task records stored in audit subsystem.

Returns:
A list which contained all audit task records.

getAllAuditTasks

java.util.List<AuditTaskRecord> getAllAuditTasks(long beginTime,
                                                 long endTime)
Gets the audit task records which met the specified time condition stored in audit subsystem.

Parameters:
beginTime - The begin time. The audit task records which earlier then the time will not be contain in results.
endTime - The end time. The audit task record which later then the time will not be contain in results.
Returns:
A list which contained all audit task records which met the specified time condition.

getWaitingAuditTasks

java.util.List<AuditTaskRecord> getWaitingAuditTasks()
Gets all audit task records whose status was "Waiting" stored in audit subsystem.

Returns:
A list which contained all audit task records whose status was "Waiting".

getWaitingAuditTasks

java.util.List<AuditTaskRecord> getWaitingAuditTasks(long beginTime,
                                                     long endTime)
Gets all audit task records whose status was "Waiting" and met the specified time condition stored in audit subsystem.

Parameters:
beginTime - The begin time. The audit task records which earlier then the time will not be contain in results.
endTime - The end time. The audit task record which later then the time will not be contain in results.
Returns:
A list which contained all audit task records whose status was "Waiting" and met the specified time condition.

getRunningAuditTasks

java.util.List<AuditTaskRecord> getRunningAuditTasks()
Gets all audit task records whose status was "Running" stored in audit subsystem.

Returns:
A list which contained all audit task records whose status was "Running".

getRunningAuditTasks

java.util.List<AuditTaskRecord> getRunningAuditTasks(long beginTime,
                                                     long endTime)
Gets all audit task records whose status was "Running" and met the specified time condition stored in audit subsystem.

Parameters:
beginTime - The begin time. The audit task records which earlier then the time will not be contain in results.
endTime - The end time. The audit task record which later then the time will not be contain in results.
Returns:
A list which contained all audit task records whose status was "Running" and met the specified time condition.

getFinishedAuditTasks

java.util.List<AuditTaskRecord> getFinishedAuditTasks()
Gets all audit task records whose status was "Finished" stored in audit subsystem.

Returns:
A list which contained all audit task records whose status was "Finished".

getFinishedAuditTasks

java.util.List<AuditTaskRecord> getFinishedAuditTasks(long beginTime,
                                                      long endTime)
Gets all audit task records whose status was "Finished" and met the specified time condition stored in audit subsystem.

Parameters:
beginTime - The begin time. The audit task records which earlier then the time will not be contain in results.
endTime - The end time. The audit task record which later then the time will not be contain in results.
Returns:
A list which contained all audit task records whose status was "Finished" and met the specified time condition.

getFailedAuditTasks

java.util.List<AuditTaskRecord> getFailedAuditTasks()
Gets all audit task records whose status was "Failed" stored in audit subsystem.

Returns:
A list which contained all audit task records whose status was "Failed".

getFailedAuditTasks

java.util.List<AuditTaskRecord> getFailedAuditTasks(long beginTime,
                                                    long endTime)
Gets all audit task records whose status was "Failed" and met the specified time condition stored in audit subsystem.

Parameters:
beginTime - The begin time. The audit task records which earlier then the time will not be contain in results.
endTime - The end time. The audit task record which later then the time will not be contain in results.
Returns:
A list which contained all audit task records whose status was "Failed" and met the specified time condition.