All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.JobList

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

public class JobList
extends Object
implements Serializable
The JobList class represents a list of AS/400 jobs.

For example:

 JobList jobList = new JobList( as400 );
 Enumeration e = jobList.getJobs ();
 while (e.hasMoreElements ())
 {
   Job j = (Job) e.nextElement ();
   System.out.println (j);
 }
 

JobList objects generate the following events:

See Also:
Job

Variable Index

 o ALL
Constant indicating that the all jobs are returned.

Constructor Index

 o JobList()
Constructs a JobList object.
 o JobList(AS400)
Constructs a JobList object.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to be notified when the value of any bound property is changed.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener to be notified when the value of any constrained property is changed.
 o getJobs()
Returns a list of jobs defined on the AS/400.
 o getLength()
Returns the number of jobs in the list that was most recently retrieved from the AS/400 (the last call to getJobs()).
 o getName()
Returns the job name that describes which jobs are returned.
 o getNumber()
Returns the job number that describes which jobs are returned.
 o getSystem()
Returns the AS/400 system from which the list of jobs will be retrieved.
 o getUser()
Returns the user name that describes which jobs are returned.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a property change listener from the listener list.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable change listener from the listener list.
 o setName(String)
Sets the job name that describes which jobs are returned.
 o setNumber(String)
Sets the job number that describes which jobs are returned.
 o setSystem(AS400)
Sets the AS/400 system from which the list of jobs will be retrieved.
 o setUser(String)
Sets the user name value that describes which jobs are returned.

Variables

 o ALL
 public static final String ALL
Constant indicating that the all jobs are returned.

Constructors

 o JobList
 public JobList()
Constructs a JobList object. The system property needs to be set before using any method requiring a connection to the AS/400.

 o JobList
 public JobList(AS400 system)
Constructs a JobList object.

Depending on how the AS400 object was constructed, the user may be prompted for the system name, user ID, or password when any method requiring a connection to the AS/400 is used.

Parameters:
system - The AS/400 system from which the list of jobs will be retrieved. This value cannot be null.

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to be notified when the value of any bound property is changed. The propertyChange() method will be be called.

Parameters:
listener - The PropertyChangeListener.
 o addVetoableChangeListener
 public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener to be notified when the value of any constrained property is changed. The vetoableChange() method will be called.

Parameters:
listener - The VetoableChangeListener.
 o getJobs
 public Enumeration getJobs() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
Returns a list of jobs defined on the AS/400. A valid AS/400 system must be provided before this call is made.

Returns:
An Enumeration of Job objects.
Throws: AS400Exception
If the AS/400 system returns an error message.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ConnectionDroppedException
If the connection is dropped unexpectedly.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS/400 object does not exist.
Throws: ServerStartupException
If the AS/400 server cannot be started.
Throws: UnknownHostException
If the AS/400 system cannot be located.
 o getLength
 public int getLength()
Returns the number of jobs in the list that was most recently retrieved from the AS/400 (the last call to getJobs()).

Returns:
The number of jobs, or 0 if no list has been retrieved.
 o getName
 public String getName()
Returns the job name that describes which jobs are returned.

Returns:
The job name.
 o getNumber
 public String getNumber()
Returns the job number that describes which jobs are returned.

Returns:
The job number.
 o getSystem
 public AS400 getSystem()
Returns the AS/400 system from which the list of jobs will be retrieved.

Returns:
The AS/400 system from which the list of jobs will be retrieved.
 o getUser
 public String getUser()
Returns the user name that describes which jobs are returned.

Returns:
The user name.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener from the listener list.

Parameters:
listener - The PropertyChangeListener.
 o removeVetoableChangeListener
 public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable change listener from the listener list.

Parameters:
listener - The VetoableChangeListener.
 o setName
 public void setName(String name) throws PropertyVetoException
Sets the job name that describes which jobs are returned. The default is ALL. This takes effect the next time that getJobs() is called.

Parameters:
name - The job name, or ALL for all job names. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o setNumber
 public void setNumber(String number) throws PropertyVetoException
Sets the job number that describes which jobs are returned. The default is ALL. This takes effect the next time that getJobs() is called.

Parameters:
number - The job number, or ALL for all job numbers. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o setSystem
 public void setSystem(AS400 system) throws PropertyVetoException
Sets the AS/400 system from which the list of jobs will be retrieved.

Parameters:
system - The AS/400 system from which the list of jobs will be retrieved. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.
 o setUser
 public void setUser(String user) throws PropertyVetoException
Sets the user name value that describes which jobs are returned. The default is ALL. This takes effect the next time that getUsers() is called.

Parameters:
user - The user name, or ALL for all user names. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index