JobList
instead, as this package may be removed in the future.public class RJobList extends SystemResourceList
Use one or more of these selection IDs with
getSelectionValue()
and setSelectionValue()
to access the selection values for an RJobList.
The following sort IDs are supported:
Use one or more of these sort IDs with
getSortValue()
and setSortValue()
to access the sort values for an RJobList.
RJobList objects generate RJob
objects.
// Create an RJobList object to represent a list of jobs. AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD"); RJobList jobList = new RJobList(system);
// Set the selection so that only active jobs with the name // "QZDASOINIT" are included in the list. jobList.setSelectionValue(RJobList.PRIMARY_JOB_STATUSES, new String[] { RJob.JOB_STATUS_ACTIVE }); jobList.setSelectionValue(RJobList.JOB_NAME, "QZDASOINIT");
// Set the sort value so that the list is sorted by // user name and job type. Object[] sortValue = new Object[] { RJob.USER_NAME, RJob.JOB_TYPE }; jobList.setSortValue(sortValue);
// Open the list and wait for it to complete. jobList.open(); jobList.waitForComplete();
// Read and print the job numbers for the jobs in the list. long numberOfJobs = jobList.getListLength(); for(long i = 0; i < numberOfJobs; ++i) { RJob job = (RJob)jobList.resourceAt(i); System.out.println(job.getAttributeValue(RJob.JOB_NUMBER)); }
// Close the list. jobList.close();
RJob
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL
Deprecated.
Constant indicating that all jobs are returned.
|
static java.lang.String |
BLANK
Deprecated.
Constant indicating that a blank value is used.
|
static java.lang.String |
CURRENT
Deprecated.
Constant indicating that the current value is used.
|
static java.lang.String |
JOB_NAME
Deprecated.
Selection ID for job name.
|
static java.lang.String |
JOB_NUMBER
Deprecated.
Selection ID for job number.
|
static java.lang.String |
JOB_TYPE
Deprecated.
Selection ID for job type.
|
static java.lang.String |
PRIMARY_JOB_STATUSES
Deprecated.
Selection ID for jobs on primary job statuses.
|
static java.lang.String |
USER_NAME
Deprecated.
Selection ID for user name.
|
Constructor and Description |
---|
RJobList()
Deprecated.
Constructs an RJobList object.
|
RJobList(AS400 system)
Deprecated.
Constructs an RJobList object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
establishConnection()
Deprecated.
Establishes the connection to the system.
|
close, isBidiEnabled, isResourceAvailable, open, refreshContents, refreshStatus, resourceAt, setSelectionValue, waitForComplete, waitForResource
fireResourceAdded, getNumberOfPages, getPageSize, setNumberOfPages, setPageSize
addActiveStatusListener, addPropertyChangeListener, addResourceListListener, addVetoableChangeListener, arePropertiesFrozen, fireBusy, fireIdle, fireLengthChanged, fireListClosed, fireListCompleted, fireListInError, fireListOpened, firePropertyChange, fireVetoableChange, freezeProperties, getAttributeMetaData, getAttributeMetaData, getListLength, getPresentation, getSelectionMetaData, getSelectionMetaData, getSelectionValue, getSelectionValue, getSortMetaData, getSortMetaData, getSortOrder, getSortValue, getSystem, isComplete, isConnectionEstablished, isInError, isOpen, removeActiveStatusListener, removePropertyChangeListener, removeResourceListListener, removeVetoableChangeListener, resources, setAttributeMetaData, setPresentation, setSelectionValue, setSortOrder, setSortValue, setSystem, toString
public static final java.lang.String ALL
public static final java.lang.String BLANK
public static final java.lang.String CURRENT
public static final java.lang.String JOB_NAME
public static final java.lang.String JOB_NUMBER
ALL
- All job numbers.
public static final java.lang.String JOB_TYPE
ALL
- All job types.
RJob.JOB_TYPE_AUTOSTART
- The job is an autostart job.
RJob.JOB_TYPE_BATCH
- The job is a batch job.
RJob.JOB_TYPE_INTERACTIVE
- The job is an interactive job.
RJob.JOB_TYPE_SUBSYSTEM_MONITOR
- The job is a subsystem monitor job.
RJob.JOB_TYPE_SPOOLED_READER
- The job is a spooled reader job.
RJob.JOB_TYPE_SYSTEM
- The job is a system job.
RJob.JOB_TYPE_SPOOLED_WRITER
- The job is a spooled writer job.
RJob.JOB_TYPE_SCPF_SYSTEM
- The job is the SCPF system job.
public static final java.lang.String PRIMARY_JOB_STATUSES
RJob.JOB_STATUS_ACTIVE
- The job is active.
RJob.JOB_STATUS_JOBQ
- The job is currently on a job queue.
RJob.JOB_STATUS_OUTQ
- The job has completed running, but still has output
on an output queue.
public static final java.lang.String USER_NAME
public RJobList()
public RJobList(AS400 system)
system
- The system.protected void establishConnection() throws ResourceException
The method is called by the resource framework automatically when the connection needs to be established.
establishConnection
in class ResourceList
ResourceException
- If an error occurs.