Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.commands
Class InteractiveJob

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.commands.InteractiveJob

public class InteractiveJob
extends Object

This class encapsulates the functions for the interactive job support. The class is used by the CmdSubSystemImpl to invoke the interactive job functions. Architecture: Each command is sent to the Command Miner and then passed on to the interactive job's processing program (STRRSESVR). Once the command gets to the miner the miner generates a positive 4 byte integer and assigns it to the command. There are two ways to exit the STRRSESVR, either by selecting "Release Interactive Job" from the popup menu for an iSeries subsystem or by ending the STRRSESVR command with ENDRQS. In the first case the CommandMiner sends an exit message to the STRRSESVR command which handles cleanup (deleting the data queue.) In the latter case the STRRSESVR command sends an EXIT message to the CommandMiner and the CommandMiner handles cleanup.


Field Summary
static String Copyright
           
 
Constructor Summary
InteractiveJob(String jobName, String queueName, QSYSCommandSubSystem subsystem, QSYSCommandService service)
          Constructor
 
Method Summary
 int getCurrentRequestCount()
          Return the number of outstanding commands to be run in the interactive job.
 String getDataQName()
          Get the data queue name for the interactive job
 String getJobName()
          Get the job name for the interactive job
 JobTicket getJobTicket()
          Get the JobTicket for the associated interactive job.
 Shell getShell()
           
 boolean isInteractiveJobBusy()
          Check if the interactive job is currently busy processing a command.
 boolean releaseInteractiveJob()
          Releases the interactive job.
 Object[] runCommand(String command)
          Run an interactive iSeries QSYS command (vs QSHELL).
 void setJobTicket(JobTicket ticket)
          Set the JobTicket for the associated interactive job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

InteractiveJob

public InteractiveJob(String jobName,
                      String queueName,
                      QSYSCommandSubSystem subsystem,
                      QSYSCommandService service)
Constructor

Method Detail

getCurrentRequestCount

public int getCurrentRequestCount()
Return the number of outstanding commands to be run in the interactive job. This count includes the command currently executing in the interactive job if one is currently running.


isInteractiveJobBusy

public boolean isInteractiveJobBusy()
Check if the interactive job is currently busy processing a command. This is just a shortcut for:

getCurrentRequestCount() != 0


runCommand

public Object[] runCommand(String command)
Run an interactive iSeries QSYS command (vs QSHELL). This requires there to be an interactive job started via the STRRSESERVER iSeries command.

Parameters:
command - The command to be run.
Returns:
An array of SystemMessageObject instances, each representing a message from the command.
See Also:
#isInteractiveJobAvailable()

releaseInteractiveJob

public boolean releaseInteractiveJob()
Releases the interactive job.


getJobName

public String getJobName()
Get the job name for the interactive job


getDataQName

public String getDataQName()
Get the data queue name for the interactive job


getShell

public Shell getShell()

getJobTicket

public JobTicket getJobTicket()
Get the JobTicket for the associated interactive job.


setJobTicket

public void setJobTicket(JobTicket ticket)
Set the JobTicket for the associated interactive job.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.