|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.console.Job
public class Job
A Job is an object that represents a schedule when it is set to run on the ReportCaster
Distribution Server. Each schedule can have any number of associated jobs set to be run
on The ReportCaster Distribution Server queue. There is a one-to-many relationship
between a Schedule and a Job.
In the out-of-the box product, Job objects are associated with the ReportCaster Console.
Within the API, Job objects are managed by implementing the ConsoleManager interface.
Only a ReportCaster administrator has access to jobs in ReportCaster.
Moreover, because the ReportCaster Distribution Server creates jobs, the administrator
cannot call any Job objects set methods, but can only call getMethods
in order to retrieve
information pertaining to specific jobs on queue.
The code example below shows an implementation of the Category
class.
It is taken from the coding samples packaged with the product in the samples directory.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Copyright (c) 2004 Information Builders, Inc. All Rights Reserved. + + + + Information Builders offers sample API programs as a heuristic device. + + They are not intended, as is, for production use. Licensed users are + + welcome to alter and extend these samples and deploy them in other + + environments, or alternate configurations, as they see fit. + + Information Builders will support the documented functionality of + + its API classes and methods. However, Information Builders is not + + responsible for functionality or behavior of products built with + + its API unless the documented behavior of its discrete classes and + + methods is different than the actual results. + + + + Redistributions of IBI source code and documentation must be within + + the scope of the Information Builders Software License Agreement. + + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public class C11_Get_Running { public C11_Get_Running(String[] arg) throws Exception { // Create scheduleManager & consoleManager CasterConnection casterConnection = Util.createCasterConnection(); ScheduleManager scheduleManager = casterConnection.getScheduleManager(); ConsoleManager manager = casterConnection.getConsoleManager(); //create object schedule with default values from config file Schedule schedule = scheduleManager.createScheduleInstanceDefault(); //set description schedule.setDescription("SdReportWait01"); //set distribution to library StorageLibrary distribution = new StorageLibrary(); schedule.setDistribution(distribution); //create task TaskStandardReport task = new TaskStandardReport(); task.setProcedureName("app/carwait"); task.setDomainHREF("untitled/untitled.htm"); task.setFolderHREF("#group1stkg1e"); task.setExecId("execid"); task.setExecPassword("execpass"); schedule.setTaskList(new Task[]{task}); // run scheduleManager.run(schedule); // run schedule.setDescription("SdReportWait02"); scheduleManager.run(schedule); // run schedule.setDescription("SdReportWait03"); scheduleManager.run(schedule); // Retrieve job list running Job[] jobList = manager.getRunningJobs(); // Print result System.out.println("ProcessId TimeInQ ScheduleDescription"); for(int i = 0; i < jobList.length; i++) { System.out.println(jobList[i].getId() + " " + jobList[i].getStartTime().getTime().toLocaleString() + " " + jobList[i].getSchedule().getDescription()); } } public static void main(String[] arg) { C11_Get_Running sampl = null; try { System.out.println("\n******* " + C11_Get_Running.class.getName() + " *****************"); sampl = new C11_Get_Running(arg); System.out.println(sampl.getClass().getName() + " OK"); } catch(Exception ce) { ce.printStackTrace(); System.out.println(sampl.getClass().getName() + " FAIL"); } } }
Constructor Summary | |
---|---|
Job()
|
Method Summary | |
---|---|
java.lang.String |
getDistributionServerName()
|
java.lang.String |
getFullyQualifiedServerName()
|
java.lang.String |
getId()
Obtains a String identifier associated with this Job on the ReportCaster Console. |
Schedule |
getSchedule()
Obtains the Schedule object being run on the Distribution Server associated with this Job. |
java.util.Calendar |
getStartTime()
Obtains the time that the schedule associated with this job is either put on the queue of the Distribution Server, or sent to the WebFOCUS Reporting Server for execution. |
int |
getStatus()
|
void |
setDistributionServerName(java.lang.String distributionServerName)
|
void |
setFullyQualifiedServerName(java.lang.String fullyQualifiedServerName)
|
void |
setId(java.lang.String id)
Specifies a String identifier associated with this Job on the ReportCaster Console. |
void |
setSchedule(Schedule schedule)
Assigns the Schedule object to be run on the Distribution Server. |
void |
setStartTime(java.util.Calendar timeInQueue)
Specifies the time that the schedule associated with this job is either put on the queue of the Distribution Server or sent to the WebFOCUS Reporting Server for execution. |
void |
setStatus(int status)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Job()
Method Detail |
---|
public java.lang.String getId()
setId(java.lang.String)
public void setId(java.lang.String id)
id
- The String identifier for the Job.public Schedule getSchedule()
setSchedule(Schedule)
public void setSchedule(Schedule schedule)
schedule
- The schedule object to be run.getSchedule()
public java.util.Calendar getStartTime()
getJobsInQueue()
and getRunningJobs()
from
the ConsoleManager
class. These will return an array of jobs either running or in
queue. The array in which the job appears will allow the developer to know which status the time
refers. This data is transitory and is not available after a job leaves a queue or completes
execution. The actual calendar instance involved is a GregorianCalendar.
setStartTime(Calendar)
public void setStartTime(java.util.Calendar timeInQueue)
timeInQueue
- Calendar time the schedule was either placed in queue or
submitted for execution.getStartTime()
public java.lang.String getDistributionServerName()
public void setDistributionServerName(java.lang.String distributionServerName)
public int getStatus()
public void setStatus(int status)
public java.lang.String getFullyQualifiedServerName()
public void setFullyQualifiedServerName(java.lang.String fullyQualifiedServerName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |