com.ibm.as400.access
Class JobList

java.lang.Object
  |
  +--com.ibm.as400.access.JobList
All Implemented Interfaces:
java.io.Serializable

public class JobList
extends java.lang.Object
implements java.io.Serializable

The JobList class represents a list of OS/400 jobs. By default, all jobs are selected. To filter the list, use the addJobSelectionCriteria() method.

See Also:
Serialized Form

Field Summary
static java.lang.String ALL
          Deprecated. Use the selection constant that corresponds to the particular job selection criteria you are filtering. For example, to select jobs for all job names, do: JobList list = new JobList(system); list.addJobSelectionCriteria(JobList.SELECTION_JOB_NAME, JobList.SELECTION_JOB_NAME_ALL); For backwards compatibility, this has the same effect: JobList list = new JobList(system); list.setName(JobList.SELECTION_JOB_NAME_ALL);
static int SELECTION_ACTIVE_JOB_STATUS
          Selection type used for job selection based on active job status.
static int SELECTION_INITIAL_USER
          Selection type used for job selection based on the user name for a job's initial thread.
static int SELECTION_JOB_NAME
          Selection type used for job selection based on job name.
static java.lang.String SELECTION_JOB_NAME_ALL
          Selection value indicating all jobs will be selected regardless of the job name.
static java.lang.String SELECTION_JOB_NAME_CURRENT
          Selection value indicating all jobs with the current job's name will be selected.
static java.lang.String SELECTION_JOB_NAME_ONLY
          Selection value indicating only the job in which this program is running will be selected.
static int SELECTION_JOB_NUMBER
          Selection type used for job selection based on job number.
static java.lang.String SELECTION_JOB_NUMBER_ALL
          Selection value indicating all jobs with the specified job name and user name will be selected, regardless of the job number.
static int SELECTION_JOB_QUEUE
          Selection type used for job selection based on job queue.
static int SELECTION_JOB_QUEUE_STATUS_HELD
          Selection type used for job selection based on a job's status on the job queue.
static int SELECTION_JOB_QUEUE_STATUS_READY
          Selection type used for job selection based on a job's status on the job queue.
static int SELECTION_JOB_QUEUE_STATUS_SCHEDULE
          Selection type used for job selection based on a job's status on the job queue.
static int SELECTION_JOB_TYPE
          Selection type used for job selection based on job type.
static java.lang.String SELECTION_JOB_TYPE_ALL
          Selection value indicating all job types will be selected.
static int SELECTION_JOB_TYPE_ENHANCED
          Selection type used for job selection based on the enhanced job type.
static java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_BATCH
          Selection value indicating all the batch job types will be selected.
static java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_INTERACTIVE
          Selection value indicating all the interactive job types will be selected.
static java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_PRESTART
          Selection value indicating all the prestart job types will be selected.
static int SELECTION_PRIMARY_JOB_STATUS_ACTIVE
          Selection type used for job selection based on primary job status.
static int SELECTION_PRIMARY_JOB_STATUS_JOBQ
          Selection type used for job selection based on primary job status.
static int SELECTION_PRIMARY_JOB_STATUS_OUTQ
          Selection type used for job selection based on primary job status.
static int SELECTION_SERVER_TYPE
          Selection type used for job selection based on the server type.
static java.lang.String SELECTION_SERVER_TYPE_ALL
          Selection value indicating all jobs with a server type will be selected.
static java.lang.String SELECTION_SERVER_TYPE_BLANK
          Selection value indicating all jobs without a server type will be selected.
static int SELECTION_USER_NAME
          Selection type used for job selection based on user name.
static java.lang.String SELECTION_USER_NAME_ALL
          Selection value indicating all jobs that use the specified job name will be selected, regardless of the user name.
static java.lang.String SELECTION_USER_NAME_CURRENT
          Selection value indicating all jobs that use the current job's user profile will be selected.
 
Constructor Summary
JobList()
          Constructs a JobList object.
JobList(AS400 system)
          Constructs a JobList object.
 
Method Summary
 void addJobAttributeToRetrieve(int attribute)
          Adds a job attribute that will be retrieved for each job in this job list.
 void addJobAttributeToSortOn(int attribute, boolean sortOrder)
          Adds a job attribute used to sort the list.
 void addJobSelectionCriteria(int selectionType, java.lang.Object selectionValue)
          Adds a selection type and value to be used to filter the list of jobs.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds a VetoableChangeListener.
 void clearJobAttributesToRetrieve()
          Clears the job attributes to be retrieved.
 void clearJobAttributesToSortOn()
          Clears the job attributes used to sort the list.
 void clearJobSelectionCriteria()
          Clears the selection types and values used to filter the list of jobs.
 void close()
          Closes the job list on the system.
protected  void finalize()
          Closes the job list on the system when this object is garbage collected.
 java.util.Enumeration getJobs()
          Returns the list of jobs in the job list.
 Job[] getJobs(int listOffset, int number)
          Returns a subset of the list of jobs in the job list.
 int getLength()
          Returns the number of jobs in the list.
 java.lang.String getName()
          Returns the job name that describes which jobs are returned.
 java.lang.String getNumber()
          Returns the job number that describes which jobs are returned.
 AS400 getSystem()
          Returns the system.
 java.lang.String getUser()
          Returns the user name that describes which jobs are returned.
 void load()
          Loads the list of jobs on the system.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Removes a VetoableChangeListener.
 void setName(java.lang.String name)
          Sets the job name that describes which jobs are returned.
 void setNumber(java.lang.String number)
          Sets the job number that describes which jobs are returned.
 void setSystem(AS400 system)
          Sets the system.
 void setUser(java.lang.String user)
          Sets the user name value that describes which jobs are returned.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final java.lang.String ALL
Deprecated. Use the selection constant that corresponds to the particular job selection criteria you are filtering. For example, to select jobs for all job names, do: JobList list = new JobList(system); list.addJobSelectionCriteria(JobList.SELECTION_JOB_NAME, JobList.SELECTION_JOB_NAME_ALL); For backwards compatibility, this has the same effect: JobList list = new JobList(system); list.setName(JobList.SELECTION_JOB_NAME_ALL);

Constant indicating that all the jobs are returned.

SELECTION_JOB_NAME

public static final int SELECTION_JOB_NAME
Selection type used for job selection based on job name. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a String. Possible values are: The default is SELECTION_JOB_NAME_ALL.
See Also:
setName(java.lang.String), Job.JOB_NAME

SELECTION_JOB_NAME_ALL

public static final java.lang.String SELECTION_JOB_NAME_ALL
Selection value indicating all jobs will be selected regardless of the job name. The user name and job type fields must be specified.
See Also:
SELECTION_JOB_NAME

SELECTION_JOB_NAME_CURRENT

public static final java.lang.String SELECTION_JOB_NAME_CURRENT
Selection value indicating all jobs with the current job's name will be selected.
See Also:
SELECTION_JOB_NAME

SELECTION_JOB_NAME_ONLY

public static final java.lang.String SELECTION_JOB_NAME_ONLY
Selection value indicating only the job in which this program is running will be selected. The user name and job type fields must be blank.
See Also:
SELECTION_JOB_NAME

SELECTION_USER_NAME

public static final int SELECTION_USER_NAME
Selection type used for job selection based on user name. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a String. Possible values are: The default is SELECTION_USER_NAME_ALL.
See Also:
setUser(java.lang.String), Job.USER_NAME

SELECTION_USER_NAME_ALL

public static final java.lang.String SELECTION_USER_NAME_ALL
Selection value indicating all jobs that use the specified job name will be selected, regardless of the user name. The job name and job number fields must be specified.
See Also:
SELECTION_USER_NAME

SELECTION_USER_NAME_CURRENT

public static final java.lang.String SELECTION_USER_NAME_CURRENT
Selection value indicating all jobs that use the current job's user profile will be selected.
See Also:
SELECTION_USER_NAME

SELECTION_JOB_NUMBER

public static final int SELECTION_JOB_NUMBER
Selection type used for job selection based on job number. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a String. Possible values are: The default is SELECTION_JOB_NUMBER_ALL.
See Also:
setNumber(java.lang.String), Job.JOB_NUMBER

SELECTION_JOB_NUMBER_ALL

public static final java.lang.String SELECTION_JOB_NUMBER_ALL
Selection value indicating all jobs with the specified job name and user name will be selected, regardless of the job number. The job name and user name fields must be specified.
See Also:
SELECTION_JOB_NUMBER

SELECTION_JOB_TYPE

public static final int SELECTION_JOB_TYPE
Selection type used for job selection based on job type. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a String. Possible values are: The default is SELECTION_JOB_TYPE_ALL.
See Also:
Job.JOB_TYPE

SELECTION_JOB_TYPE_ALL

public static final java.lang.String SELECTION_JOB_TYPE_ALL
Selection value indicating all job types will be selected.
See Also:
SELECTION_JOB_TYPE

SELECTION_PRIMARY_JOB_STATUS_ACTIVE

public static final int SELECTION_PRIMARY_JOB_STATUS_ACTIVE
Selection type used for job selection based on primary job status. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true.
See Also:
Job.JOB_STATUS

SELECTION_PRIMARY_JOB_STATUS_JOBQ

public static final int SELECTION_PRIMARY_JOB_STATUS_JOBQ
Selection type used for job selection based on primary job status. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true.
See Also:
Job.JOB_STATUS

SELECTION_PRIMARY_JOB_STATUS_OUTQ

public static final int SELECTION_PRIMARY_JOB_STATUS_OUTQ
Selection type used for job selection based on primary job status. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true.
See Also:
Job.JOB_STATUS

SELECTION_ACTIVE_JOB_STATUS

public static final int SELECTION_ACTIVE_JOB_STATUS
Selection type used for job selection based on active job status. Multiple selection values are allowed for this selection type. The selection value corresponding to this selection type is a String. See Job.ACTIVE_JOB_STATUS for allowed values. By default no selection values are specified for this selection type. This value is only used when the value for SELECTION_PRIMARY_JOB_STATUS_ACTIVE is true.
See Also:
SELECTION_PRIMARY_JOB_STATUS_ACTIVE, Job.ACTIVE_JOB_STATUS

SELECTION_JOB_QUEUE_STATUS_SCHEDULE

public static final int SELECTION_JOB_QUEUE_STATUS_SCHEDULE
Selection type used for job selection based on a job's status on the job queue. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true. This value is only used when the value for SELECTION_PRIMARY_JOB_STATUS_JOBQ is true.
See Also:
SELECTION_PRIMARY_JOB_STATUS_JOBQ, Job.JOB_QUEUE_STATUS

SELECTION_JOB_QUEUE_STATUS_HELD

public static final int SELECTION_JOB_QUEUE_STATUS_HELD
Selection type used for job selection based on a job's status on the job queue. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true. This value is only used when the value for SELECTION_PRIMARY_JOB_STATUS_JOBQ is true.
See Also:
SELECTION_PRIMARY_JOB_STATUS_JOBQ, Job.JOB_QUEUE_STATUS

SELECTION_JOB_QUEUE_STATUS_READY

public static final int SELECTION_JOB_QUEUE_STATUS_READY
Selection type used for job selection based on a job's status on the job queue. Only one selection value is allowed for this selection type. The selection value corresponding to this selection type is a Boolean. The default is true. This value is only used when the value for SELECTION_PRIMARY_JOB_STATUS_JOBQ is true.
See Also:
SELECTION_PRIMARY_JOB_STATUS_JOBQ, Job.JOB_QUEUE_STATUS

SELECTION_JOB_QUEUE

public static final int SELECTION_JOB_QUEUE
Selection type used for job selection based on job queue. Multiple selection values are allowed for this selection type. The selection value corresponding to this selection type is a String representing the fully-qualified integrated file system name for an OS/400 job queue. By default no selection values are specified for this selection type. This value is only used when the value for SELECTION_PRIMARY_JOB_STATUS_JOBQ is true.
See Also:
SELECTION_PRIMARY_JOB_STATUS_JOBQ, QSYSObjectPathName, Job.JOB_QUEUE

SELECTION_INITIAL_USER

public static final int SELECTION_INITIAL_USER
Selection type used for job selection based on the user name for a job's initial thread. Multiple selection values are allowed for this selection type. The selection value corresponding to this selection type is a String. By default no selection values are specified for this selection type.

SELECTION_SERVER_TYPE

public static final int SELECTION_SERVER_TYPE
Selection type used for job selection based on the server type. Multiple selection values are allowed for this selection type. The selection value corresponding to this selection type is a String. By default no selection values are specified for this selection type. Possible values are:
See Also:
Job.SERVER_TYPE

SELECTION_SERVER_TYPE_ALL

public static final java.lang.String SELECTION_SERVER_TYPE_ALL
Selection value indicating all jobs with a server type will be selected.
See Also:
SELECTION_SERVER_TYPE

SELECTION_SERVER_TYPE_BLANK

public static final java.lang.String SELECTION_SERVER_TYPE_BLANK
Selection value indicating all jobs without a server type will be selected.
See Also:
SELECTION_SERVER_TYPE

SELECTION_JOB_TYPE_ENHANCED

public static final int SELECTION_JOB_TYPE_ENHANCED
Selection type used for job selection based on the enhanced job type. Multiple selection values are allowed for this selection type. The selection value corresponding to this selection type is an Integer. By default no selection values are specified for this selection type. Possible values are:
See Also:
Job.JOB_TYPE_ENHANCED

SELECTION_JOB_TYPE_ENHANCED_ALL_BATCH

public static final java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_BATCH
Selection value indicating all the batch job types will be selected.
See Also:
SELECTION_JOB_TYPE_ENHANCED, Job.JOB_TYPE_ENHANCED_BATCH, Job.JOB_TYPE_ENHANCED_BATCH_IMMEDIATE, Job.JOB_TYPE_ENHANCED_BATCH_MRT, Job.JOB_TYPE_ENHANCED_BATCH_ALTERNATE_SPOOL_USER

SELECTION_JOB_TYPE_ENHANCED_ALL_INTERACTIVE

public static final java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_INTERACTIVE
Selection value indicating all the interactive job types will be selected.
See Also:
SELECTION_JOB_TYPE_ENHANCED, Job.JOB_TYPE_ENHANCED_INTERACTIVE, Job.JOB_TYPE_ENHANCED_INTERACTIVE_GROUP, Job.JOB_TYPE_ENHANCED_INTERACTIVE_SYSREQ, Job.JOB_TYPE_ENHANCED_INTERACTIVE_SYSREQ_AND_GROUP

SELECTION_JOB_TYPE_ENHANCED_ALL_PRESTART

public static final java.lang.Integer SELECTION_JOB_TYPE_ENHANCED_ALL_PRESTART
Selection value indicating all the prestart job types will be selected.
See Also:
SELECTION_JOB_TYPE_ENHANCED, Job.JOB_TYPE_ENHANCED_PRESTART, Job.JOB_TYPE_ENHANCED_PRESTART_BATCH, Job.JOB_TYPE_ENHANCED_PRESTART_COMM
Constructor Detail

JobList

public JobList()
Constructs a JobList object. The system must be set before retrieving the list of jobs.
See Also:
setSystem(com.ibm.as400.access.AS400)

JobList

public JobList(AS400 system)
Constructs a JobList object.
Parameters:
system - The system.
Method Detail

addJobAttributeToRetrieve

public void addJobAttributeToRetrieve(int attribute)
Adds a job attribute that will be retrieved for each job in this job list. This method allows the Job objects that are retrieved from this JobList to have some of their attributes already filled in, so that a call to Job.getValue() does not result in another API call back to the server for each job in the list.

The list of job attributes is maintained internally even when this JobList is closed and re-used. To start over with a new set of job attributes to retrieve, call clearJobAttributesToRetrieve().

Parameters:
attribute - The job attribute to retrieve. Possible values are all job attributes contained in the Job class, excluding the following:
  • Job.CURRENT_LIBRARY
  • Job.CURRENT_LIBRARY_EXISTENCE
  • Job.INTERNAL_JOB_ID
  • Job.PRODUCT_LIBRARIES
  • Job.SUBMITTED_BY_JOB_NUMBER
  • Job.SUBMITTED_BY_USER
  • Job.SYSTEM_LIBRARY_LIST
  • Job.USER_LIBRARY_LIST
See Also:
clearJobAttributesToRetrieve(), Job

addJobSelectionCriteria

public void addJobSelectionCriteria(int selectionType,
                                    java.lang.Object selectionValue)
                             throws java.beans.PropertyVetoException
Adds a selection type and value to be used to filter the list of jobs. If a selection type supports only one value, then the selection value used will be the one that was passed on the most recent call to this method for that selection type.

The list of job selection criteria is maintained internally even when this JobList is closed and re-used. To start over with a new set of job selection criteria, call clearJobSelectionCriteria().

Parameters:
selectionType - The constant indicating which selection type used to filter the list. Possible values are:
selectionValue - The value for the selection type. See the individual selection type constants for the appropriate object or constant to use. Some selection types allow multiple selection values to be added.
See Also:
clearJobSelectionCriteria(), Job

addJobAttributeToSortOn

public void addJobAttributeToSortOn(int attribute,
                                    boolean sortOrder)
Adds a job attribute used to sort the list.

The list of job attributes to sort on is maintained internally even when this JobList is closed and re-used. To start over with a new set of job attributes to sort on, call clearJobAttributesToSortOn().

Parameters:
attribute - The job attribute on which to sort. Possible values are all job attributes contained in the Job class, excluding the following:
  • Job.CURRENT_LIBRARY
  • Job.CURRENT_LIBRARY_EXISTENCE
  • Job.INTERNAL_JOB_ID
  • Job.PRODUCT_LIBRARIES
  • Job.SUBMITTED_BY_JOB_NUMBER
  • Job.SUBMITTED_BY_USER
  • Job.SYSTEM_LIBRARY_LIST
  • Job.USER_LIBRARY_LIST
sortOrder - true to sort ascending; false to sort descending.
See Also:
clearJobAttributesToSortOn(), Job

clearJobAttributesToSortOn

public void clearJobAttributesToSortOn()
Clears the job attributes used to sort the list. This resets all of the job sort parameters to their default values.
See Also:
addJobAttributeToSortOn(int, boolean)

clearJobAttributesToRetrieve

public void clearJobAttributesToRetrieve()
Clears the job attributes to be retrieved. This removes all of the job attributes that would be retrieved. Some attributes are always retrieved, regardless if they are in this list or not, such as job name, job number, and user name.
See Also:
addJobAttributeToRetrieve(int)

clearJobSelectionCriteria

public void clearJobSelectionCriteria()
                               throws java.beans.PropertyVetoException
Clears the selection types and values used to filter the list of jobs. This resets all of the job selection parameters to their default values.
See Also:
addJobSelectionCriteria(int, java.lang.Object)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange() method will be called each time the value of any bound property is changed.
Parameters:
listener - The listener.
See Also:
removePropertyChangeListener(java.beans.PropertyChangeListener)

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener. The specified VetoableChangeListener's vetoableChange() method will be called each time the value of any constrained property is changed.
Parameters:
listener - The listener.
See Also:
removeVetoableChangeListener(java.beans.VetoableChangeListener)

close

public void close()
           throws AS400Exception,
                  AS400SecurityException,
                  ErrorCompletingRequestException,
                  java.lang.InterruptedException,
                  java.io.IOException,
                  ObjectDoesNotExistException
Closes the job list on the system. This releases any system resources previously in use by this job list.
Throws:
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.
java.io.IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.

finalize

protected void finalize()
                 throws java.lang.Throwable
Closes the job list on the system when this object is garbage collected.
Overrides:
finalize in class java.lang.Object

getJobs

public java.util.Enumeration getJobs()
                              throws AS400Exception,
                                     AS400SecurityException,
                                     ErrorCompletingRequestException,
                                     java.lang.InterruptedException,
                                     java.io.IOException,
                                     ObjectDoesNotExistException
Returns the list of jobs in the job list. This is the same as calling getJobs(-1, getLength()).
Returns:
An Enumeration of Job objects.
Throws:
AS400Exception - If the AS/400 system returns an error message.
AS400SecurityException - If a security or authority error occurs.
ConnectionDroppedException - If the connection is dropped unexpectedly.
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 AS/400.
ObjectDoesNotExistException - If the AS/400 object does not exist.
ServerStartupException - If the AS/400 server cannot be started.
java.net.UnknownHostException - If the AS/400 system cannot be located.
See Also:
Job

getJobs

public Job[] getJobs(int listOffset,
                     int number)
              throws AS400Exception,
                     AS400SecurityException,
                     ErrorCompletingRequestException,
                     java.lang.InterruptedException,
                     java.io.IOException,
                     ObjectDoesNotExistException
Returns a subset of the list of jobs in the job list. This method allows the user to retrieve the job list from the server in pieces. If a call to load() is made (either implicitly or explicitly), then the jobs at a given offset will change, so a subsequent call to getJobs() with the same listOffset and number will most likely not return the same Jobs as the previous call.
Parameters:
listOffset - The offset into the list of jobs. This value must be greater than 0 and less than the list length, or specify -1 to retrieve all of the jobs.
number - The number of jobs to retrieve out of the list, starting at the specified listOffset. This value must be greater than or equal to 0 and less than or equal to the list length.
Returns:
The array of retrieved Job objects.
Throws:
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.
java.io.IOException - If an error occurs while communicating with the system.
ObjectDoesNotExistException - If the object does not exist on the system.
See Also:
Job

getLength

public int getLength()
Returns the number of jobs in the list. This method implicitly calls load() if it has not already been called.
Returns:
The number of jobs, or 0 if no list was retrieved.
See Also:
load()

getName

public java.lang.String getName()
Returns the job name that describes which jobs are returned.
Returns:
The job name.
See Also:
setName(java.lang.String)

getNumber

public java.lang.String getNumber()
Returns the job number that describes which jobs are returned.
Returns:
The job number.
See Also:
setNumber(java.lang.String)

getSystem

public AS400 getSystem()
Returns the system.
Returns:
The system.
See Also:
setSystem(com.ibm.as400.access.AS400)

getUser

public java.lang.String getUser()
Returns the user name that describes which jobs are returned.
Returns:
The user name.
See Also:
setUser(java.lang.String)

load

public void load()
          throws AS400Exception,
                 AS400SecurityException,
                 ErrorCompletingRequestException,
                 java.lang.InterruptedException,
                 java.io.IOException,
                 ObjectDoesNotExistException
Loads the list of jobs on the system. This method informs the system to build a list of jobs given the previously added job attributes to select, retrieve, and sort. This method blocks until the system returns the total number of jobs it has compiled. A subsequent call to getJobs() will retrieve the actual job information and attributes for each job in the list from the system.

This method updates the list length.

Throws:
AS400Exception - If the system returns an error message.
AS400SecurityException - If a security or authority error occurs.
ConnectionDroppedException - If the connection is dropped unexpectedly.
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 object does not exist on the system.
ServerStartupException - If the server cannot be started.
java.net.UnknownHostException - If the system cannot be located.
See Also:
getLength()

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener.
Parameters:
listener - The listener.
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener)

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener.
Parameters:
listener - The listener.
See Also:
addVetoableChangeListener(java.beans.VetoableChangeListener)

setName

public void setName(java.lang.String name)
             throws java.beans.PropertyVetoException
Sets the job name that describes which jobs are returned. The default is SELECTION_JOB_NAME_ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
name - The job name, or SELECTION_JOB_NAME_ALL for all job names.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
addJobSelectionCriteria(int, java.lang.Object), getName()

setNumber

public void setNumber(java.lang.String number)
               throws java.beans.PropertyVetoException
Sets the job number that describes which jobs are returned. The default is SELECTION_JOB_NUMBER_ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
number - The job number, or SELECTION_JOB_NUMBER_ALL for all job numbers.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
addJobSelectionCriteria(int, java.lang.Object), getNumber()

setSystem

public void setSystem(AS400 system)
               throws java.beans.PropertyVetoException
Sets the system. This cannot be changed if the object has established a connection to the server.
Parameters:
system - The system.
Throws:
java.beans.PropertyVetoException - If the property change is vetoed.
See Also:
getSystem()

setUser

public void setUser(java.lang.String user)
             throws java.beans.PropertyVetoException
Sets the user name value that describes which jobs are returned. The default is SELECTION_USER_NAME_ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
user - The user name, or SELECTION_USER_NAME_ALL for all user names.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
addJobSelectionCriteria(int, java.lang.Object), getUser()