com.ibm.as400.access

Class JobQueue

  • java.lang.Object
    • com.ibm.as400.access.JobQueue
  • All Implemented Interfaces:
    java.io.Serializable


    public class JobQueue
    extends java.lang.Object
    implements java.io.Serializable
    Represents an IBM i job queue. Note that calling any of the attribute getters for the first time will result in an implicit call to refresh(). If any exception is thrown by an implicit call to refresh(), it will be logged to Trace.ERROR and rethrown as a java.lang.RuntimeException. However, should an exception occur during an explicit call to refresh(), the exception will be thrown as-is to the caller. Implementation note: This class internally calls the Retrieve Job Queue(QSPRJOBQ) API.
    Author:
    zhangze
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      JobQueue(AS400 system, QSYSObjectPathName path)
      Constructs a JobQueue.
      JobQueue(AS400 system, java.lang.String library, java.lang.String name)
      Constructs a JobQueue.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean exists()
      Determines if the subsystem currently exists on the system.
      java.lang.String getAuthorityCheck()
      Whether the user must be the owner of the queue in order to control the queue by holding or releasing the queue
      int getCurrentActive()
      Return The current number of jobs that are active that came through this job queue entry
      java.lang.String getJobQLibrary()
      Return the library containing the job queue.
      java.lang.String getJobQName()
      Return the job queue name
      java.lang.String getJobQueueStatus()
      Return The status of the job queue
      int getMaxActive()
      Return The maximum number of jobs that can be active at the same time through this job queue entry.
      int getNumberOfJobs()
      Return The number of jobs in the queue
      ObjectDescription getObjectDescription()
      Returns an ObjectDescription instance representing the subsystem.
      java.lang.String getOperatorControlled()
      Return Whether a user who has job control authority is allowed to control this job queue and manage the jobs on the queue.
      int getSequenceNumber()
      Return The job queue entry sequence number
      java.lang.String getSubsystemLibrary()
      Return The library in which the subsystem description resides
      java.lang.String getSubsystemName()
      Return The name of the subsystem that can receive jobs from this job queue
      java.lang.String getTextDescription()
      Return Text that briefly describes the job queue
      void refresh()
      Refreshes the values for all attributes of the job queue.
      void setFormat(java.lang.String format)
      Set retrieve Job Queue format
      void setLibraryName(java.lang.String library)
      Sets the job queue library.
      void setName(java.lang.String name)
      Sets the job queue name.
      void setSystem(AS400 system)
      Sets the system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JobQueue

        public JobQueue(AS400 system,
                java.lang.String library,
                java.lang.String name)
        Constructs a JobQueue.
        Parameters:
        system - The system where the job queue resides.
        library - library The library containing the job queue.
        name - name The name of the job queue to retrieve.
      • JobQueue

        public JobQueue(AS400 system,
                QSYSObjectPathName path)
        Constructs a JobQueue.
        Parameters:
        system - The system where the job queue resides.
        path - path The fully qualified IFS path to the job queue.
    • Method Detail

      • getJobQName

        public java.lang.String getJobQName()
        Return the job queue name
        Returns:
        the job queue name
      • getJobQLibrary

        public java.lang.String getJobQLibrary()
        Return the library containing the job queue.
        Returns:
        the library containing the job queue.
      • getSubsystemName

        public java.lang.String getSubsystemName()
        Return The name of the subsystem that can receive jobs from this job queue
        Returns:
        The name of the subsystem that can receive jobs from this job queue
      • getSubsystemLibrary

        public java.lang.String getSubsystemLibrary()
        Return The library in which the subsystem description resides
        Returns:
        The library in which the subsystem description resides
      • getOperatorControlled

        public java.lang.String getOperatorControlled()
        Return Whether a user who has job control authority is allowed to control this job queue and manage the jobs on the queue.
        Returns:
        Whether a user who has job control authority is allowed to control this job queue and manage the jobs on the queue. The possible values are: *YES *NO
      • getAuthorityCheck

        public java.lang.String getAuthorityCheck()
        Whether the user must be the owner of the queue in order to control the queue by holding or releasing the queue
        Returns:
        Whether the user must be the owner of the queue in order to control the queue by holding or releasing the queue The possible values are: *OWNER *DTAAUT
      • getNumberOfJobs

        public int getNumberOfJobs()
        Return The number of jobs in the queue
        Returns:
        The number of jobs in the queue
      • getJobQueueStatus

        public java.lang.String getJobQueueStatus()
        Return The status of the job queue
        Returns:
        The status of the job queue The possible values are: RELEASED HELD
      • getTextDescription

        public java.lang.String getTextDescription()
        Return Text that briefly describes the job queue
        Returns:
        Text that briefly describes the job queue
      • getSequenceNumber

        public int getSequenceNumber()
        Return The job queue entry sequence number
        Returns:
        The job queue entry sequence number
      • getMaxActive

        public int getMaxActive()
        Return The maximum number of jobs that can be active at the same time through this job queue entry. A -1 in this field indicates that the value is *NOMAX.
        Returns:
        The maximum number of jobs that can be active at the same time through this job queue entry
      • getCurrentActive

        public int getCurrentActive()
        Return The current number of jobs that are active that came through this job queue entry
        Returns:
        The current number of jobs that are active that came through this job queue entry
      • setSystem

        public void setSystem(AS400 system)
        Sets the system. Cannot be changed after the object has established a connection to the system.
        Parameters:
        system - The system where the job queue resides.
      • setName

        public void setName(java.lang.String name)
        Sets the job queue name. Cannot be changed after the object has established a connection to the system.
        Parameters:
        name - the job queue name
      • setLibraryName

        public void setLibraryName(java.lang.String library)
        Sets the job queue library. Cannot be changed after the object has established a connection to the system.
        Parameters:
        name - the job queue library
      • setFormat

        public void setFormat(java.lang.String format)
        Set retrieve Job Queue format
        Parameters:
        format - The possible values are:
        • "JOBQ0100" format
        • "JOBQ0200" format
      • getObjectDescription

        public ObjectDescription getObjectDescription()
        Returns an ObjectDescription instance representing the subsystem.
        Returns:
        An ObjectDescription for the subsystem.