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