Class JDPSubsystemMgr
java.lang.Object
|
+----java.lang.Thread
|
+----JDPSubsystemMgr
- public class JDPSubsystemMgr
- extends Thread
-
JDPSubsystemMgr(JaggServer)
-
-
createJobQueue(String)
- Create the selected jobqueue.
-
createSubsystem(String)
- Create the selected subsystem.
-
getActiveJobs()
- Get a delimited list of all the jobs.
-
getClassForName(String)
- Get the class type that is being run in a job of this name.
-
getClassForNumber(int)
- Get the class type that is being run in the requested job.
-
getJDPSystemSetup(String)
- Get the configuration of the selected system.
-
getJob(int)
- Get the handle to the requested job.
-
getJobForName(String)
- Get the handle to the class that is being run in a job of this name.
-
getJobForNumber(int)
- Get the handle to the class that is being run in the requested job.
-
getJobLog(int)
- Get the job log for the selected job.
-
getJobRunningClass(String)
- Get the handle to the class that is being run in an active job.
-
getJobsForClass(String)
- Get the numbers of jobs that are running the specified class name.
-
getJobsForName(String)
- Get the numbers of jobs that have the specified name.
-
getSubsystems()
- Get a delimited list of all the subsystems.
-
getSystems()
- Get a list of the systems that are currently configured
-
interruptScheduler()
- Tell the scheduler to check for new jobs.
-
killJob(int, String)
- Kill the selected job.
-
loadJaggSettings()
-
-
removeJob(int, String)
- Remove the selected job from the job queue.
-
removeJobQueue(String)
- Remove the selected jobqueue.
-
removeSubsystem(String)
- Remove the selected subsystem.
-
requestUpdate()
- Tell the server manager that a job status has been changed and
therefore should be recorded
-
run()
-
-
setJobHeld(int, boolean, String)
- Set the job to be held or active.
-
setJobJobQueue(int, String, String)
- Set the jobqueue for the selected job.
-
setJobPriority(int, int, String)
- Set the priority for the selected job.
-
setJobQueueHeld(String, boolean)
- Set the jobqueue to be held or active.
-
setJobQueuePriority(int, int, String)
- Set the queue priority for the selected job.
-
setJobQueueSubsystem(String, String)
- Set the subsystem that a jobqueue releases it's jobs into.
-
setMaxJobs(String, int)
- Set the maximum jobs for the selected subsystem.
-
setSubsystemHeld(String, boolean)
- Set the subsystem to be held or active.
-
setSubsystemPriority(String, int)
- Set the priority for the selected subsystem.
-
startSystemJob(String, String)
-
-
submitJob(String, String, String, String, String, String, String, String, int, int, boolean, int, String, String, String)
- Submit a job to run on the server.
-
triggerEvent(String, String)
- Trigger the selected event
JDPSubsystemMgr
public JDPSubsystemMgr(JaggServer jaggServer)
run
public void run()
- Overrides:
- run in class Thread
requestUpdate
public void requestUpdate()
- Tell the server manager that a job status has been changed and
therefore should be recorded
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.
triggerEvent
public boolean triggerEvent(String JDPSystem,
String eventName)
- Trigger the selected event
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.
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.
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.
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.
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.
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.
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.
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.
interruptScheduler
public void interruptScheduler()
- Tell the scheduler to check for new jobs.
getSubsystems
public String getSubsystems()
- Get a delimited list of all the subsystems.
getActiveJobs
public String getActiveJobs()
- Get a delimited list of all the jobs.
startSystemJob
public String startSystemJob(String subsystem,
String jobName)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
killJob
public String killJob(int jobNumber,
String user)
- Kill the selected job.
- Parameters:
- jobNumber - the jobNumber of the job to adjust.
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.
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.
loadJaggSettings
public boolean loadJaggSettings()
getSystems
public String[] getSystems()
- Get a list of the systems that are currently configured
- Returns:
- a list of the system numbers
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.