public class JobQueue
extends java.lang.Object
implements java.io.Serializable
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.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.
|
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.
|
public JobQueue(AS400 system, java.lang.String library, java.lang.String name)
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.public JobQueue(AS400 system, QSYSObjectPathName path)
system
- The system where the job queue resides.path
- path The fully qualified IFS path to the job queue.public void refresh() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, ObjectDoesNotExistException, java.io.IOException
AS400Exception
- If the system returns an error message.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.ObjectDoesNotExistException
- If the object does not exist on the system.java.io.IOException
- If an error occurs while communicating with the system.public java.lang.String getJobQName()
public java.lang.String getJobQLibrary()
public java.lang.String getSubsystemName()
public java.lang.String getSubsystemLibrary()
public java.lang.String getOperatorControlled()
public java.lang.String getAuthorityCheck()
public int getNumberOfJobs()
public java.lang.String getJobQueueStatus()
public java.lang.String getTextDescription()
public int getSequenceNumber()
public int getMaxActive()
public int getCurrentActive()
public void setSystem(AS400 system)
system
- The system where the job queue resides.public void setName(java.lang.String name)
name
- the job queue namepublic void setLibraryName(java.lang.String library)
name
- the job queue librarypublic void setFormat(java.lang.String format)
format
- The possible values are:
public boolean exists() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
AS400Exception
- If the program call returns error messages.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system API (that queries subsystem description information) is missing.public ObjectDescription getObjectDescription()