<< Click to Display Table of Contents >>
Scheduler
This class creates report scheduling jobs and performs the result file and scheduler management functions.
Constructor Detail
Scheduler
public Scheduler(String ip, int port)
Creates report schedule jobs and perform result file and scheduler management functions.
Parameters:
ip - IP address
port - Port number
Method Detail
createTask
public String createTask(ServerInfo s, SortProperties configMap, SortProperties exportMap)
Creates a scheduling task based on the form file and gets the task ID.
Parameters:
s - OZ Server information
configMap - Configuration option used when creating task
exportMap - Configuration option of the files exported from the OZ Scheduler
getTask
public Vector getTask(ServerInfo s)
Gets the result of the currently Scheduling task.
Parameters:
s - OZ sever information
getTaskResult
public TaskResult[] getTaskResult(ServerInfo s, String from, String to, String taskId, int rollingIndex)
Gets the results of task execution of a rolled file.
Parameters:
s - OZ Server information
from - Starting time
to - End time
taskId - Task ID
rollingIndex - File index
getTaskResults
public TaskResult[] getTaskResults(ServerInfo s, String from, String to, String taskId)
Gets the scheduling task result.
Parameters:
s - OZ Server information
from - Starting time
to - End time
taskId - Task ID
getTaskProperties
public SortProperties[] getTaskProperties(ServerInfo s, String taskId)
Gets task properties.
Parameters:
s - OZ Server information
taskId - Task ID
getTaskWaitTime
public int getTaskWaitTime(ServerInfo s, String taskId)
Gets the amount of time in seconds the task waited.
Parameters:
s - OZ Server information
taskId - Task ID
getTaskWaitCount
public int getTaskWaitCount()
Gets the number of tasks that are waiting.
removeTask
public void removeTask(ServerInfo s, String taskId)
Deletes a scheduling task.
Parameters:
s - OZ Server information
taskId - Task ID
modifyTask
public String modifyTask(ServerInfo s, String taskId, SortProperties configMap, SortProperties exportMap)
Modifies a task property.
Parameters:
s - OZ Server information
taskId - Task ID
configMap - OZ Scheduler configuration option
exportMap - Export information
taskPause
public boolean taskPause(ServerInfo s, String taskId)
Pauses a scheduling task.
Parameters:
s - OZ Server information
taskId - Task ID
taskResume
public boolean taskResume(ServerInfo s, String taskId)
Resumes a paused scheduling task.
Parameters:
s - OZ Server information
taskId - Task ID
stop
public void stop(ServerInfo s, boolean waitTaskId)
Stops a scheduler.
Parameters:
s - OZ Server information
waitTaskId - Whether to stops the OZ Scheduler abort
export
public boolean export(ServerInfo s, SortProperties configMap, SortProperties exportMap)
Export by using the viewer parameter as it is and then returns the result.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
exportMap - Export information
makePDF
public boolean makePDF(ServerInfo s, SortProperties configMap, SortProperties exportMap)
Performs PDF exporting without registering in the OZ Scheduler’s work list and then returns the result.
Parameters:
s - OZ Server information
configMap - Form information for export
exportMap - PDF export information
public boolean print(ServerInfo s, SortProperties configMap, SortProperties printMap)
Prints by applying the viewer parameter.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
printMap - Print information
getCurrentStatus
public String getCurrentStatus() throws SchedulerException
Gets the scheduler's used memory, total memory, number of running viewers, and number of waiting viewers.
getConfiguration
public SortProperties getConfiguration(ServerInfo s)
Gets the OZ Scheduler configurations.
Parameters:
s - OZ Server information
modifyConfiguration
public void modifyConfiguration(ServerInfo s, SortProperties configMap)
Modifies the OZ Scheduler configurations.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
setReceiveTimeout
public void setReceiveTimeout(int timeout)
Sets the socket timeout.
Parameters:
timeout - Socket timeout
ping
public boolean ping()
Returns whether the server is running.
getOZSList
public String[] getOZSList(String path)
Gets the list of OZS files in the set path.
Parameters:
path - The path
ozsVerConv
public void ozsVerConv(String oldPath, String newPath)
Converts a 2.5 version OZS file into the latest version and saves it.
Parameters:
oldPath - The OZS file name or path to convert
newPath - The path for saving the converted OZS file
addTaskHolidayInfo
public boolean addTaskHolidayInfo(TaskHolidayInfo value)
Adds task holiday information.
Parameters
value - Task holiday information
modifyTaskHolidayInfo
public boolean modifyTaskHolidayInfo(String old_key, TaskHolidayInfo new_value)
Modifies task holiday information.
Parameters:
old_key - The task holiday name to modify
new_value - New task holiday information
deleteTaskHolidayInfo
public boolean deleteTaskHolidayInfo(String[] keys)
Deletes task holiday information.
Parameters:
keys - The task holiday name array to delete
addTaskHolidayGroupInfo
public boolean addTaskHolidayGroupInfo(TaskHolidayGroupInfo value)
Adds task holiday group information.
Parameters:
value - Task holiday group information
modifyTaskHolidayGroupInfo
public boolean modifyTaskHolidayGroupInfo(String old_key, TaskHolidayGroupInfo new_value)
Modifies task holiday group information.
Parameters:
old_key - The task holiday group name to modify
new_value - New task holiday group information
deleteTaskHolidayGroup
public boolean deleteTaskHolidayGroupInfo(String key)
Deletes task holiday group information.
Parameters:
key - The task holiday group name to delete
getTaskHolidayInfoList
public OZMap getTaskHolidayInfoList()
Gets the list of task holiday information.
getTaskHolidayGroupInfoList
public OZMap getTaskHolidayGroupInfoList()
Gets the list of task holiday group information.
saveTaskHoliday
public void saveTaskHoliday()
Saves task holiday information as an xml file.
directExport
public DirectExportResult directExport(ServerInfo s, SortProperties configMap, SortProperties exportMap) throws SchedulerException
Export by applying the viewer parameter.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
exportMap - Export information
directExportFiles
public Hashtable[] directExportFiles(ServerInfo s, SortProperties configMap, SortProperties exportMap, String localTempPath) throws SchedulerException
Export by applying the viewer parameter.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
exportMap - Export information
localTempPath - local temporary path
directExportResult
public DirectExportResult directExportResult(ServerInfo s, SortProperties configMap, SortProperties exportMap)
Export by applying the viewer parameter.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
exportMap - Export information
directExportByteArray
public HashTable directExportByteArray(ServerInfo s, SortProperties configMap, SortProperties exportMap) throws SchedulerException
Run the task.
Parameters:
s - OZ Server information
configMap - OZ Scheduler configuration option
exportMap - Export information
directPrint
public DirectPrintResult directPrint(ServerInfo s, SortProperties configMap, SortProperties printMap) throws SchedulerException
Print by applying the viewer parameter.
Parameters:
s - OZ Server information
configMap - Scheduler configuration information
printMap - Print information