ibi.broker.api.cci
Interface ConsoleManager


public interface ConsoleManager

ConsoleManager This interface provides API
 users with the ability to access information about jobs on the ReportCaster Distribution 
 Server as well as jobs on queue to run on the ReportCasetr Distribution Server. The information that 
 can be retrieved through this interface includes the following lists: 
 all jobs currently running on the server, all jobs currently running by owner, 
 jobs on queue to run on the distribution server, and jobs on queue to run on 
 distribution server by owner. 
 Finally a given Job scheduled for execution on 
 the Distribution Server can be removed from the queue or have its priority changed
 through the console manager interface. 
 The sample code below shows the instantiation of a ConsoleManager object.

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      
 +  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.       +      
 +                                                                          +      
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   

 CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();
 managedConnectionFactory.setServerName(host);//the name of the server running the distribution server
 managedConnectionFactory.setPortNumber(port);//the port the distribution server is listening
 CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory();
 ConnectionSpec credential = new PasswordCredential(user, password.toCharArray());
    //This can be any of the credential objects. It is assumed here the user String has been assigned earlier
   // and that password, also assigned earlier, is a String that needs to be converted to a character Array.
 CasterConnection connectionObject = ((CasterConnection)connectionFactory.getConnection(credential));
 ConsoleManager manager = connectionObject.getConsoleManager();
 

Version:
5.3

Method Summary
 void changeJobPriority(java.lang.String jobId, int priority)
          Given a job id, which uniquely identifies a job, and an integer of 1 thru 5 representing a priority, changes the order of execution of the specified Distribution Server job to the new priority.
 int deleteRunningJobsFromDS(java.lang.Object[] arJobId)
           
 ibi.broker.scheduler.SCHLogRecords getInMemoryLogWithJobNumber(java.lang.String jobNum, java.lang.String serverId)
           
 ibi.broker.system.monitor.Stack getJobCounterStack(java.lang.String serverName)
           
 Job[] getJobsInQueue()
          Retrieves an Array of all Jobs that are currently on queue to run on the Distribution Server.
 Job[] getJobsInQueueByOwner(java.lang.String owner)
          Retrieves an Array of Jobs having a specified owner that are currently on queue to run on the Distribution Server.
 Job[] getJobsInQueueByOwnerByServer(java.lang.String owner, java.lang.String serverId)
           
 JobStatus getJobStatus(java.lang.String jobId)
           
 ibi.broker.system.monitor.JobStatusStack getJobStatusStack(java.lang.String serverName)
           
 ibi.broker.ui.data.config.general.DistributionServerNode[] getNodeList()
           
 Job[] getRunningJobs()
          Retrieves an array of all Jobs that are currently running on the Distribution Server.
 Job[] getRunningJobsByOwner(java.lang.String owner)
          Retrieves an array of all Jobs that are currently running on the Distribution Server which belong to a specified owner.
 Job[] getRunningJobsByOwnerByServer(java.lang.String owner, java.lang.String serverId)
           
 int removeJobFromManagerQueue(java.lang.String jobId)
           
 int removeJobFromQueue(java.lang.String jobId)
          Provided with a specified job ID, which uniquely identifies a Job, removes the job from ReportCaster's Distribution Server queue.
 boolean resumeDistributionServer()
           
 boolean suspendDistributionServer()
           
 

Method Detail

getJobsInQueue

Job[] getJobsInQueue()
                     throws CasterException
Retrieves an Array of all Jobs that are currently on queue to run on the Distribution Server.

Returns:
an array of Job objects.
Throws:
CasterException

getJobsInQueueByOwner

Job[] getJobsInQueueByOwner(java.lang.String owner)
                            throws CasterException
Retrieves an Array of Jobs having a specified owner that are currently on queue to run on the Distribution Server.

Parameters:
owner - username of the owner as a String
Returns:
an array of Job objects with specified owner.
Throws:
CasterException

removeJobFromQueue

int removeJobFromQueue(java.lang.String jobId)
                       throws CasterException
Provided with a specified job ID, which uniquely identifies a Job, removes the job from ReportCaster's Distribution Server queue.

Parameters:
jobId - String uniquely identifying a Job
Throws:
CasterException

getRunningJobs

Job[] getRunningJobs()
                     throws CasterException
Retrieves an array of all Jobs that are currently running on the Distribution Server.

Returns:
an array of Job objects.
Throws:
CasterException

getRunningJobsByOwner

Job[] getRunningJobsByOwner(java.lang.String owner)
                            throws CasterException
Retrieves an array of all Jobs that are currently running on the Distribution Server which belong to a specified owner.

Parameters:
owner - Username of Job owner as a String
Returns:
an array of Job objects with specified job owner.
Throws:
CasterException

changeJobPriority

void changeJobPriority(java.lang.String jobId,
                       int priority)
                       throws CasterException
Given a job id, which uniquely identifies a job, and an integer of 1 thru 5 representing a priority, changes the order of execution of the specified Distribution Server job to the new priority.

Parameters:
jobId - String uniquely identifying a Job
priority - integer denoting the order of execution of a Job on queue of the Distribution Server.
Throws:
CasterException

getJobsInQueueByOwnerByServer

Job[] getJobsInQueueByOwnerByServer(java.lang.String owner,
                                    java.lang.String serverId)
                                    throws CasterException
Parameters:
owner -
serverId -
Returns:
Throws:
CasterException

getRunningJobsByOwnerByServer

Job[] getRunningJobsByOwnerByServer(java.lang.String owner,
                                    java.lang.String serverId)
                                    throws CasterException
Parameters:
owner -
serverId -
Returns:
Throws:
CasterException

getNodeList

ibi.broker.ui.data.config.general.DistributionServerNode[] getNodeList()
                                                                       throws CasterException
Returns:
Throws:
CasterException

removeJobFromManagerQueue

int removeJobFromManagerQueue(java.lang.String jobId)
                              throws CasterException
Parameters:
jobId -
Returns:
Throws:
CasterException

suspendDistributionServer

boolean suspendDistributionServer()
                                  throws CasterException
Returns:
Throws:
CasterException

resumeDistributionServer

boolean resumeDistributionServer()
                                 throws CasterException
Returns:
Throws:
CasterException

getInMemoryLogWithJobNumber

ibi.broker.scheduler.SCHLogRecords getInMemoryLogWithJobNumber(java.lang.String jobNum,
                                                               java.lang.String serverId)
                                                               throws CasterException
Returns:
Throws:
CasterException

deleteRunningJobsFromDS

int deleteRunningJobsFromDS(java.lang.Object[] arJobId)
                            throws CasterException
Returns:
Throws:
CasterException

getJobCounterStack

ibi.broker.system.monitor.Stack getJobCounterStack(java.lang.String serverName)
                                                   throws CasterException
Throws:
CasterException

getJobStatusStack

ibi.broker.system.monitor.JobStatusStack getJobStatusStack(java.lang.String serverName)
                                                           throws CasterException
Throws:
CasterException

getJobStatus

JobStatus getJobStatus(java.lang.String jobId)
                       throws CasterException
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.