All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.JobLog

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

public class JobLog
extends Object
implements Serializable
The JobLog class represents an AS/400 job log. This is used to get a list of messages in a job log.

For example:

 JobLog log = new JobLog (as400, jobName, jobUser, jobNumber);
 Enumeration e = log.getMessages ();
 while (e.hasMoreElements ())
 {
    QueuedMessage message = (QueuedMessage) e.nextElement ();
    System.out.println (message.getText ());
 }
 

JobLog objects generate the following events:

See Also:
QueuedMessage

Constructor Index

 o JobLog()
Constructs a JobLog object.
 o JobLog(AS400)
Constructs a JobLog object.
 o JobLog(AS400, String, String, String)
Constructs a JobLog 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 getLength()
Returns the number of messages in the list that was most recently retrieved from the AS/400 (the last call to getMessages()).
 o getMessages()
Returns a list of messages in the job log.
 o getName()
Returns the job name.
 o getNumber()
Returns the job number.
 o getSystem()
Returns the AS/400 system on which the job log exists.
 o getUser()
Returns the user name.
 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.
 o setNumber(String)
Sets the job number.
 o setSystem(AS400)
Sets the AS/400 system on which the job log exists.
 o setUser(String)
Sets the user name.

Constructors

 o JobLog
 public JobLog()
Constructs a JobLog object. The system, name, user, and number properties need to be set before using any method requiring a connection to the AS/400.

 o JobLog
 public JobLog(AS400 system)
Constructs a JobLog object. The name, user, and number properties need to be set before using any method requiring a connection to the AS/400.

Parameters:
system - The AS/400 system.
 o JobLog
 public JobLog(AS400 system,
               String name,
               String user,
               String number)
Constructs a JobLog object.

Parameters:
system - The AS/400 system.
name - The job name.
user - The job user.
number - The job number.

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 getName
 public String getName()
Returns the job name.

Returns:
The job name, or "" if none has been set.
 o getNumber
 public String getNumber()
Returns the job number.

Returns:
The job number, or "" if none has been set.
 o getLength
 public int getLength()
Returns the number of messages in the list that was most recently retrieved from the AS/400 (the last call to getMessages()).

Returns:
The number of messages, or 0 if no list has been retrieved.
 o getMessages
 public Enumeration getMessages() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
Returns a list of messages in the job log. A valid AS/400 system, job name, user, and number must be provided before this call is made.

Returns:
An Enumeration of QueuedMessage 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 getSystem
 public AS400 getSystem()
Returns the AS/400 system on which the job log exists.

Returns:
The AS/400 system on which the job log exists.
 o getUser
 public String getUser()
Returns the user name.

Returns:
The user name, or "" if none has been set.
 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. This takes effect the next time that getMessages() is called.

Parameters:
name - The job name. 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. This takes effect the next time that getMessages() is called.

Parameters:
number - The job number. 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 on which the job log exists.

Parameters:
system - The AS/400 system on which the job log exists. 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. This takes effect the next time that getMessages() is called.

Parameters:
user - The user name. This value cannot be null.
Throws: PropertyVetoException
If the change is vetoed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index