Class JDPSubsystemMgr

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----JDPSubsystemMgr

public class JDPSubsystemMgr
extends Thread

Constructor Index

 o JDPSubsystemMgr(JaggServer)

Method Index

 o createJobQueue(String)
Create the selected jobqueue.
 o createSubsystem(String)
Create the selected subsystem.
 o getActiveJobs()
Get a delimited list of all the jobs.
 o getClassForName(String)
Get the class type that is being run in a job of this name.
 o getClassForNumber(int)
Get the class type that is being run in the requested job.
 o getJDPSystemSetup(String)
Get the configuration of the selected system.
 o getJob(int)
Get the handle to the requested job.
 o getJobForName(String)
Get the handle to the class that is being run in a job of this name.
 o getJobForNumber(int)
Get the handle to the class that is being run in the requested job.
 o getJobLog(int)
Get the job log for the selected job.
 o getJobRunningClass(String)
Get the handle to the class that is being run in an active job.
 o getJobsForClass(String)
Get the numbers of jobs that are running the specified class name.
 o getJobsForName(String)
Get the numbers of jobs that have the specified name.
 o getSubsystems()
Get a delimited list of all the subsystems.
 o getSystems()
Get a list of the systems that are currently configured
 o interruptScheduler()
Tell the scheduler to check for new jobs.
 o killJob(int, String)
Kill the selected job.
 o loadJaggSettings()
 o removeJob(int, String)
Remove the selected job from the job queue.
 o removeJobQueue(String)
Remove the selected jobqueue.
 o removeSubsystem(String)
Remove the selected subsystem.
 o requestUpdate()
Tell the server manager that a job status has been changed and therefore should be recorded
 o run()
 o setJobHeld(int, boolean, String)
Set the job to be held or active.
 o setJobJobQueue(int, String, String)
Set the jobqueue for the selected job.
 o setJobPriority(int, int, String)
Set the priority for the selected job.
 o setJobQueueHeld(String, boolean)
Set the jobqueue to be held or active.
 o setJobQueuePriority(int, int, String)
Set the queue priority for the selected job.
 o setJobQueueSubsystem(String, String)
Set the subsystem that a jobqueue releases it's jobs into.
 o setMaxJobs(String, int)
Set the maximum jobs for the selected subsystem.
 o setSubsystemHeld(String, boolean)
Set the subsystem to be held or active.
 o setSubsystemPriority(String, int)
Set the priority for the selected subsystem.
 o startSystemJob(String, String)
 o submitJob(String, String, String, String, String, String, String, String, int, int, boolean, int, String, String, String)
Submit a job to run on the server.
 o triggerEvent(String, String)
Trigger the selected event

Constructors

 o JDPSubsystemMgr
 public JDPSubsystemMgr(JaggServer jaggServer)

Methods

 o run
 public void run()
Overrides:
run in class Thread
 o requestUpdate
 public void requestUpdate()
Tell the server manager that a job status has been changed and therefore should be recorded

 o submitJob
 public String submitJob(String jobQueue,
                         String JDPSystem,
                         String jobName,
                         String jobOwner,
                         String ObjectType,
                         String Object,
                         String Constructor,
                         String Parameters,
                         int jobPriority,
                         int jobQueuePriority,
                         boolean jobHeld,
                         int notifyUser,
                         String notifyVia,
                         String notifyOn,
                         String logEvent)
Submit a job to run on the server.

Parameters:
jobQueue - the queue to which the job is submitted.
JDPSystem - the System to submit this job under.
jobName - the name to give this job.
jobOwner - the user submitting this job.
objectType - the type of object to run (C-Java Class, A-Application, J-Job Stream).
objectName - the name of the class, application or job stream.
objectConstructor - the constructor to use for creating the Java class (eg "(JDPSubsystemMgr,JDPJob)"),
objectParameters - the parameters for this Java class or Application.
jobExecutionPriority - a priority in the range 1-10. 5 is default.
jobQueuePriority - a priority in the range 1-10. 5 is default.
jobHeld - true if job should be held on the job queue.
notifyUser - the userid of the user to notify upon completion (-1 for no notification).
notifyVia - notify via (E-Email, P-Pager, B-Both).
nofifyOn - notify on (S-Success, F-Failure, B-Both).
logEvent - log event on (N-No logging, S-Success, F-Failure, B-Both).
Returns:
either "Jobnumber:nnn" if the job was submitted or a message telling why it was not submitted.
 o triggerEvent
 public boolean triggerEvent(String JDPSystem,
                             String eventName)
Trigger the selected event

 o getJob
 public JDPJob getJob(int jobNumber)
Get the handle to the requested job.

Parameters:
jobNumber - the number for the job.
Returns:
the handle to the job.
 o getJobForNumber
 public Object getJobForNumber(int jobNumber)
Get the handle to the class that is being run in the requested job.

Parameters:
jobNumber - the number for the job.
Returns:
the handle to the class.
 o getClassForNumber
 public String getClassForNumber(int jobNumber)
Get the class type that is being run in the requested job.

Parameters:
jobNumber - the number for the job.
Returns:
the name of the class.
 o getJobRunningClass
 public Object getJobRunningClass(String className)
Get the handle to the class that is being run in an active job.

Parameters:
className - the class name being run by this job.
Returns:
the handle to the class.
 o getJobForName
 public Object getJobForName(String jobName)
Get the handle to the class that is being run in a job of this name.

Parameters:
jobName - the name for the job.
Returns:
the handle to the class.
 o getClassForName
 public String getClassForName(String jobName)
Get the class type that is being run in a job of this name.

Parameters:
jobName - the name for the job.
Returns:
the handle to the class.
 o getJobsForName
 public String getJobsForName(String jobName)
Get the numbers of jobs that have the specified name.

Parameters:
jobName - the name for the job.
Returns:
the semi-colon delimited list of job numbers.
 o getJobsForClass
 public String getJobsForClass(String jobName)
Get the numbers of jobs that are running the specified class name.

Parameters:
className - the class name being run by this job.
Returns:
the semi-colon delimited list of job numbers.
 o interruptScheduler
 public void interruptScheduler()
Tell the scheduler to check for new jobs.

 o getSubsystems
 public String getSubsystems()
Get a delimited list of all the subsystems.

 o getActiveJobs
 public String getActiveJobs()
Get a delimited list of all the jobs.

 o startSystemJob
 public String startSystemJob(String subsystem,
                              String jobName)
 o setMaxJobs
 public synchronized String setMaxJobs(String subsystem,
                                       int maxJobs)
Set the maximum jobs for the selected subsystem.

Parameters:
subsystem - the subsystem to adjust.
maxJobs - the new maximum job setting
Returns:
either null if the command was successful or a message telling why it was not.
 o setSubsystemPriority
 public synchronized String setSubsystemPriority(String subsystem,
                                                 int priority)
Set the priority for the selected subsystem.

Parameters:
subsystem - the subsystem to adjust.
priority - the new priority setting
Returns:
either null if the command was successful or a message telling why it was not.
 o setSubsystemHeld
 public synchronized String setSubsystemHeld(String subsystem,
                                             boolean heldStatus)
Set the subsystem to be held or active.

Parameters:
subsystem - the subsystem to adjust.
heldStatus - the subsystem held status.
Returns:
either null if the command was successful or a message telling why it was not.
 o createSubsystem
 public synchronized String createSubsystem(String subsystem)
Create the selected subsystem.

Parameters:
subsystem - the subsystem to create.
Returns:
message that display the reason why the subsystem was not created.
 o removeSubsystem
 public synchronized String removeSubsystem(String subsystem)
Remove the selected subsystem.

Parameters:
subsystem - the subsystem to remove.
Returns:
message that display the reason why the subsystem was not removed.
 o setJobQueueSubsystem
 public synchronized String setJobQueueSubsystem(String jobqueue,
                                                 String subsystem)
Set the subsystem that a jobqueue releases it's jobs into.

Parameters:
jobqueue - the jobqueue to adjust.
subsystem - the subsystem that a jobqueue releases it's jobs into.
Returns:
either null if the command was successful or a message telling why it was not.
 o setJobQueueHeld
 public synchronized String setJobQueueHeld(String jobqueue,
                                            boolean heldStatus)
Set the jobqueue to be held or active.

Parameters:
jobqueue - the jobqueue to adjust.
heldStatus - the jobqueue held status.
Returns:
either null if the command was successful or a message telling why it was not.
 o createJobQueue
 public synchronized String createJobQueue(String jobqueue)
Create the selected jobqueue.

Parameters:
jobqueue - the jobqueue to create.
Returns:
either null if the command was successful or a message telling why it was not.
 o removeJobQueue
 public synchronized String removeJobQueue(String jobqueue)
Remove the selected jobqueue.

Parameters:
jobqueue - the jobqueue to remove.
Returns:
either null if the command was successful or a message telling why it was not.
 o setJobJobQueue
 public String setJobJobQueue(int jobNumber,
                              String jobQueue,
                              String user)
Set the jobqueue for the selected job.

Parameters:
jobNumber - the jobNumber of the job to adjust.
jobqueue - the new jobqueue for the selected job.
Returns:
either null if the command was successful or a message telling why it was not.
 o setJobPriority
 public String setJobPriority(int jobNumber,
                              int priority,
                              String user)
Set the priority for the selected job.

Parameters:
jobNumber - the jobNumber of the job to adjust.
priority - the new priority setting
Returns:
either null if the command was successful or a message telling why it was not.
 o setJobQueuePriority
 public String setJobQueuePriority(int jobNumber,
                                   int priority,
                                   String user)
Set the queue priority for the selected job.

Parameters:
jobNumber - the jobNumber of the job to adjust.
priority - the new queue priority setting
Returns:
either null if the command was successful or a message telling why it was not.
 o setJobHeld
 public String setJobHeld(int jobNumber,
                          boolean heldStatus,
                          String user)
Set the job to be held or active.

Parameters:
jobNumber - the jobNumber of the job to adjust.
heldStatus - the job held status.
Returns:
either null if the command was successful or a message telling why it was not.
 o killJob
 public String killJob(int jobNumber,
                       String user)
Kill the selected job.

Parameters:
jobNumber - the jobNumber of the job to adjust.
 o removeJob
 public String removeJob(int jobNumber,
                         String user)
Remove the selected job from the job queue.

Parameters:
jobNumber - the jobNumber of the job to adjust.
 o getJobLog
 public String getJobLog(int jobNumber)
Get the job log for the selected job.

Parameters:
jobNumber - the jobNumber of the job to get the job log.
 o loadJaggSettings
 public boolean loadJaggSettings()
 o getSystems
 public String[] getSystems()
Get a list of the systems that are currently configured

Returns:
a list of the system numbers
 o getJDPSystemSetup
 public String getJDPSystemSetup(String JDPSystem)
Get the configuration of the selected system.

Parameters:
JDPSystem - the system number.
Returns:
the settings for the selected system.