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
-
ALL
- Constant indicating that the all jobs are returned.
-
JobList()
- Constructs a JobList object.
-
JobList(AS400)
- Constructs a JobList object.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener to be notified when the value of any bound
property is changed.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a listener to be notified when the value of any constrained
property is changed.
-
getJobs()
- Returns a list of jobs defined on the AS/400.
-
getLength()
- Returns the number of jobs in the list that was most recently
retrieved from the AS/400 (the last call to getJobs()).
-
getName()
- Returns the job name that describes which jobs are returned.
-
getNumber()
- Returns the job number that describes which jobs are returned.
-
getSystem()
- Returns the AS/400 system from which the list of jobs will be
retrieved.
-
getUser()
- Returns the user name that describes which jobs are returned.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a property change listener from the listener list.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable change listener from the listener list.
-
setName(String)
- Sets the job name that describes which jobs are returned.
-
setNumber(String)
- Sets the job number that describes which jobs are returned.
-
setSystem(AS400)
- Sets the AS/400 system from which the list of jobs will be
retrieved.
-
setUser(String)
- Sets the user name value that describes which jobs are returned.
ALL
public static final String ALL
- Constant indicating that the all jobs are returned.
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.
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.
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.
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.
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.
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.
getName
public String getName()
- Returns the job name that describes which jobs are returned.
- Returns:
- The job name.
getNumber
public String getNumber()
- Returns the job number that describes which jobs are returned.
- Returns:
- The job number.
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.
getUser
public String getUser()
- Returns the user name that describes which jobs are returned.
- Returns:
- The user name.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a property change listener from the listener list.
- Parameters:
- listener - The PropertyChangeListener.
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable change listener from the listener list.
- Parameters:
- listener - The VetoableChangeListener.
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.
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.
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.
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