com.ibm.as400.access
Class JobList

java.lang.Object
  |
  +--com.ibm.as400.access.JobList

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

The JobList class represents a list of AS/400 jobs.

Some of the selections have associated get and set methods defined in this class. These are provided for backwards compatibility with previous versions of the AS/400 Toolbox for Java. The complete set of selections can be accessed using the RJobList class.

See Also:
RJobList, Serialized Form

Field Summary
static java.lang.String ALL
          Constant indicating that all jobs are returned.
static java.lang.String BLANK
          Constant indicating that a blank value is used.
static java.lang.String CURRENT
          Constant indicating that the current value is used.
 
Constructor Summary
JobList()
          Constructs a JobList object.
JobList(AS400 system)
          Constructs a JobList object.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
          Adds a VetoableChangeListener.
 java.util.Enumeration getJobs()
          Returns 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 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final java.lang.String ALL
Constant indicating that all jobs are returned.

BLANK

public static final java.lang.String BLANK
Constant indicating that a blank value is used.

CURRENT

public static final java.lang.String CURRENT
Constant indicating that the current value is used.
Constructor Detail

JobList

public JobList()
Constructs a JobList object.

JobList

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

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.

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.

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.
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.

getLength

public int getLength()
Returns the number of jobs in the list.
Returns:
The number of jobs, or 0 if no list has been retrieved.

getName

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

getNumber

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

getSystem

public AS400 getSystem()
Returns the system.
Returns:
The system.

getUser

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

removePropertyChangeListener

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

removeVetoableChangeListener

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

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 ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
name - The job name, or ALL for all job names.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
RJobList.JOB_NAME

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 ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
number - The job number, or ALL for all job numbers.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
RJobList.JOB_NUMBER

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 AS/400.
Parameters:
system - The system.
Throws:
java.beans.PropertyVetoException - If the property change is vetoed.

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 ALL. This takes effect the next time the list of jobs is retrieved or refreshed.
Parameters:
user - The user name, or ALL for all user names.
Throws:
java.beans.PropertyVetoException - If the change is vetoed.
See Also:
RJobList.USER_NAME