iSeries Remote Systems
v6.0.1

com.ibm.etools.systems.as400cmdsubsys.impl
Class InteractiveJob

java.lang.Object
  extended bycom.ibm.etools.systems.as400cmdsubsys.impl.InteractiveJob
All Implemented Interfaces:
com.ibm.etools.systems.dstore.extra.internal.extra.IDomainListener

public class InteractiveJob
extends Object
implements com.ibm.etools.systems.dstore.extra.internal.extra.IDomainListener

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(com.ibm.etools.systems.dstore.core.model.DataElement queue, CmdSubSystemImpl subsystem, ISeriesSystemDataStore system)
          Constructor
 
Method Summary
 void domainChanged(com.ibm.etools.systems.dstore.extra.internal.extra.DomainEvent event)
           
 int getCurrentRequestCount()
          Return the number of outstanding commands to be run in 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 listeningTo(com.ibm.etools.systems.dstore.extra.internal.extra.DomainEvent event)
           
 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(com.ibm.etools.systems.dstore.core.model.DataElement queue,
                      CmdSubSystemImpl subsystem,
                      ISeriesSystemDataStore system)
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


listeningTo

public boolean listeningTo(com.ibm.etools.systems.dstore.extra.internal.extra.DomainEvent event)
Specified by:
listeningTo in interface com.ibm.etools.systems.dstore.extra.internal.extra.IDomainListener

domainChanged

public void domainChanged(com.ibm.etools.systems.dstore.extra.internal.extra.DomainEvent event)
Specified by:
domainChanged in interface com.ibm.etools.systems.dstore.extra.internal.extra.IDomainListener

getShell

public Shell getShell()
Specified by:
getShell in interface com.ibm.etools.systems.dstore.extra.internal.extra.IDomainListener

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.


iSeries Remote Systems
v6.0.1

Copyright © 2005 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.