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