Class JDPRMIConnection

java.lang.Object
   |
   +----JDPRMIConnection

public class JDPRMIConnection
extends Object
Class JDPRMIConnection represents a class to call methods in classes running on the server.


Constructor Index

 o JDPRMIConnection(JDPUser)
Creates a Listener to listen for requests from the server.

Method Index

 o checkJobSubmissionAllowed(String, String)
Check whether current Enterprise Server licensing allows this job to be submitted.
 o getActiveJobInfo(int, String, String[], String[])
Get a handle to the JDPActiveJob of a server job and call the required method to get job information.
 o getJobInfo(int, String, String[], String[])
Get a handle to the JDPJob of a server job and call the required method to get job information.
 o getJobLog(int)
Get the job log for the selected job.
 o getJobsForClass(String)
Get the job numbers of any jobs running the requested class.
 o getJobsForName(String)
Get the job numbers of any jobs with the requested name.
 o invokeByClassName(String, String)
Invoke a method on the server in the job running the specified class.
 o invokeByClassName(String, String, String[], String[])
Invoke a method on the server in the job running the specified class.
 o invokeByJobName(String, String)
Invoke a method on the server in the requested object.
 o invokeByJobName(String, String, String[], String[])
Invoke a method on the server in the requested object.
 o invokeByJobNumber(int, String)
Invoke a method on the server in the requested job number.
 o invokeByJobNumber(int, String, String[], String[])
Invoke a method on the server in the requested job number
 o killJob(int, String)
Kill the selected job.
 o removeJob(int, String)
Remove the selected job from the job queue.
 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 setMaxJobs(String, int)
Set the maximum jobs for the selected subsystem.
 o setSubsystemHeld(String, boolean)
Set the subsystem to be held or active.
 o submitJob(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 JDPRMIConnection
 public JDPRMIConnection(JDPUser user)
Creates a Listener to listen for requests from the server.

Parameters:
JDPUser - the global user parameter used to pass handles in JDP.

Methods

 o getJobsForClass
 public int[] getJobsForClass(String className)
Get the job numbers of any jobs running the requested class.

Parameters:
className - the name of the class being run in the job.
Returns:
the job numbers that match this job name.
 o getJobsForName
 public int[] getJobsForName(String jobName)
Get the job numbers of any jobs with the requested name.

Parameters:
jobName - the name of the job running on the server.
Returns:
the job numbers that match this job name.
 o invokeByJobName
 public Object invokeByJobName(String jobName,
                               String methodName)
Invoke a method on the server in the requested object. The method has no parameters.

Parameters:
jobName - the name of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
Returns:
the return value of the method that is executed.
 o invokeByJobName
 public Object invokeByJobName(String jobName,
                               String methodName,
                               String paramTypes[],
                               String parameters[])
Invoke a method on the server in the requested object.

Parameters:
jobName - the name of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
parameterTypes - an array of the types of parameter types for this method.
parameterValues - the values of the parameters in String format.
Returns:
the return value of the method that is executed.
 o invokeByClassName
 public Object invokeByClassName(String className,
                                 String methodName)
Invoke a method on the server in the job running the specified class. The method has no parameters.

Parameters:
className - the name of the class on the server on which to invoke the method.
methodName - the name of the method to invoke.
Returns:
the return value of the method that is executed.
 o invokeByClassName
 public Object invokeByClassName(String className,
                                 String methodName,
                                 String paramTypes[],
                                 String parameters[])
Invoke a method on the server in the job running the specified class.

Parameters:
className - the name of the class on the server on which to invoke the method.
methodName - the name of the method to invoke.
parameterTypes - an array of the types of parameter types for this method.
parameterValues - the values of the parameters in String format.
Returns:
the return value of the method that is executed.
 o invokeByJobNumber
 public Object invokeByJobNumber(int jobNumber,
                                 String methodName)
Invoke a method on the server in the requested job number. The method has no parameters.

Parameters:
jobNumber - the number of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
Returns:
the return value of the method that is executed.
 o invokeByJobNumber
 public Object invokeByJobNumber(int jobNumber,
                                 String methodName,
                                 String paramTypes[],
                                 String parameters[])
Invoke a method on the server in the requested job number

Parameters:
jobNumber - the number of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
parameterTypes - an array of the types of parameter types for this method.
parameterValues - the values of the parameters in String format.
Returns:
the return value of the method that is executed.
 o getJobInfo
 public Object getJobInfo(int jobNumber,
                          String methodName,
                          String paramTypes[],
                          String parameters[])
Get a handle to the JDPJob of a server job and call the required method to get job information.

Parameters:
jobNumber - the number of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
parameterTypes - an array of the types of parameter types for this method.
parameterValues - the values of the parameters in String format.
Returns:
the return value of the method that is executed.
 o getActiveJobInfo
 public Object getActiveJobInfo(int jobNumber,
                                String methodName,
                                String paramTypes[],
                                String parameters[])
Get a handle to the JDPActiveJob of a server job and call the required method to get job information.

Parameters:
jobNumber - the number of the job on the server on which to invoke the method.
methodName - the name of the method to invoke.
parameterTypes - an array of the types of parameter types for this method.
parameterValues - the values of the parameters in String format.
Returns:
the return value of the method that is executed.
 o checkJobSubmissionAllowed
 public String checkJobSubmissionAllowed(String jobName,
                                         String objectName)
Check whether current Enterprise Server licensing allows this job to be submitted.

Parameters:
jobName - the name to give this job.
objectName - the name of the class, application or job stream.
Returns:
either null if the job can be submitted or a message telling why it can not be submitted.
 o submitJob
 public String submitJob(String jobQueue,
                         String jobName,
                         String objectType,
                         String objectName,
                         String objectConstructor,
                         String objectParameters,
                         int jobExecutionPriority,
                         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.
jobName - the name to give 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. This will cause the Subsystem manager to start the job with the name matching this trigger name.

Parameters:
JDPSystem - the JDPSystem number that the event is registered in.
eventName - the name of the trigger to fire.
Returns:
whether the trigger was successfully fired.
 o setJobHeld
 public void 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.
user - the name of the user changing the job state (required only for logging).
 o setJobPriority
 public void 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
 o setJobQueuePriority
 public void 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
 o setJobJobQueue
 public void 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.
 o setJobQueueHeld
 public void setJobQueueHeld(String jobqueue,
                             boolean heldStatus)
Set the jobqueue to be held or active.

Parameters:
jobqueue - the jobqueue to adjust.
heldStatus - the jobqueue held status.
 o setSubsystemHeld
 public void setSubsystemHeld(String subsystem,
                              boolean heldStatus)
Set the subsystem to be held or active.

Parameters:
subsystem - the subsystem to adjust.
heldStatus - the subsystem held status.
 o setMaxJobs
 public void 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
 o killJob
 public String killJob(int jobNumber,
                       String user)
Kill the selected job.

Parameters:
jobNumber - the jobNumber of the job to adjust.
Returns:
message indicating whether job was terminated or null if successful.
 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.
Returns:
message indicating whether job was removed or null if successful.
 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.