|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.as400.access.JobLog
The JobLog class represents an OS/400 job log. This is used to get a list of messages in a job log or to write messages to a job log.
QueuedMessage objects have many attributes. Only some of theses attribute values are set, depending on how a QueuedMessage object is created. The following is a list of attributes whose values are set on QueuedMessage objects returned in a list of job log messages:
QueuedMessage,
RJobLog,
Serialized Form| Constructor Summary | |
JobLog()
Constructs a JobLog object. |
|
JobLog(AS400 system)
Constructs a JobLog object. |
|
JobLog(AS400 system,
java.lang.String name,
java.lang.String user,
java.lang.String number)
Constructs a JobLog object. |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener. |
void |
close()
Closes the message list on the system. |
int |
getLength()
Returns the number of messages in the job log. |
boolean |
getListDirection()
Returns the list direction. |
java.util.Enumeration |
getMessages()
Returns the list of messages in the job log. |
QueuedMessage[] |
getMessages(int listOffset,
int number)
Returns a subset of the list of messages in the job log. |
java.lang.String |
getName()
Returns the job name. |
java.lang.String |
getNumber()
Returns the job number. |
byte[] |
getStartingMessageKey()
Returns the starting message key. |
AS400 |
getSystem()
Returns the system. |
java.lang.String |
getUser()
Returns the user name. |
void |
load()
Loads the list of messages on the system. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a VetoableChangeListener. |
void |
setListDirection(boolean direction)
Sets the list direction. |
void |
setName(java.lang.String name)
Sets the job name. |
void |
setNumber(java.lang.String number)
Sets the job number. |
void |
setStartingMessageKey(byte[] key)
Sets the message key used to begin searching for messages to list from the corresponding entry in the message queue. |
void |
setSystem(AS400 system)
Sets the system. |
void |
setUser(java.lang.String user)
Sets the user name. |
static void |
writeMessage(AS400 system,
java.lang.String messageID,
int messageType)
Writes a program message to the job log for the job in which the program is running. |
static void |
writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
byte[] substitutionData)
Writes a program message to the job log for the job in which the program is running. |
static void |
writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile)
Writes a program message to the job log for the job in which the program is running. |
static void |
writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile,
byte[] substitutionData)
Writes a program message to the job log for the job in which the program is running. |
static void |
writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile,
byte[] substitutionData,
boolean onThread)
Writes a program message to the job log for the job in which the program is running. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JobLog()
public JobLog(AS400 system)
system - The system.
public JobLog(AS400 system,
java.lang.String name,
java.lang.String user,
java.lang.String number)
system - The system.name - The job name.user - The user name.number - The job number.| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener.removePropertyChangeListener(java.beans.PropertyChangeListener)public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener - The listener.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void close()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
AS400Exception - If the system returns an error message.
AS400SecurityException - If a security or authority error occurs.
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 system.
ObjectDoesNotExistException - If the object does not exist on the system.public int getLength()
load().
load()public boolean getListDirection()
public java.util.Enumeration getMessages()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
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.
public QueuedMessage[] getMessages(int listOffset,
int number)
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
load() is made (either implicitly or explicitly),
then the messages at a given offset will change, so a subsequent call to
getMessages() with the same listOffset and number
will most likely not return the same QueuedMessages as the previous call.
listOffset - The offset into the list of messages. This value must be greater than 0 and
less than the list length, or specify -1 to retrieve all of the messages.number - The number of messages to retrieve out of the list, starting at the specified
listOffset. This value must be greater than or equal to 0 and less than or equal
to the list length. If the listOffset is -1, this parameter is ignored.
QueuedMessage objects.
The length of this array may not necessarily be equal to number, depending upon the size
of the list on the server, and the specified listOffset.
AS400Exception - If the system returns an error message.
AS400SecurityException - If a security or authority error occurs.
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 system.
ObjectDoesNotExistException - If the object does not exist on the system.Jobpublic java.lang.String getName()
setName(java.lang.String)public java.lang.String getNumber()
setNumber(java.lang.String)public byte[] getStartingMessageKey()
setStartingMessageKey(byte[])public AS400 getSystem()
setSystem(com.ibm.as400.access.AS400)public java.lang.String getUser()
setUser(java.lang.String)
public void load()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
getMessages() will retrieve the actual message information
and attributes for each message in the list from the system.
This method updates the list length.
AS400Exception - If the 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 system.
ObjectDoesNotExistException - If the object does not exist on the system.
ServerStartupException - If the server cannot be started.
java.net.UnknownHostException - If the system cannot be located.getLength()public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener.addPropertyChangeListener(java.beans.PropertyChangeListener)public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener - The listener.addVetoableChangeListener(java.beans.VetoableChangeListener)public void setListDirection(boolean direction)
direction - true to sort the messages oldest to newest; false to sort them newest to oldest.
The default is true.
public void setName(java.lang.String name)
throws java.beans.PropertyVetoException
name - The job name.
java.beans.PropertyVetoException - If the change is vetoed.
public void setNumber(java.lang.String number)
throws java.beans.PropertyVetoException
number - The job number.
java.beans.PropertyVetoException - If the change is vetoed.public void setStartingMessageKey(byte[] key)
MessageQueue.OLDEST and
MessageQueue#NEWEST.
key - The key. Specify null to set it back to the default.
public void setSystem(AS400 system)
throws java.beans.PropertyVetoException
system - The system.
java.beans.PropertyVetoException - If the property change is vetoed.
public void setUser(java.lang.String user)
throws java.beans.PropertyVetoException
user - The user name.
java.beans.PropertyVetoException - If the change is vetoed.
public static void writeMessage(AS400 system,
java.lang.String messageID,
int messageType)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
AS400Exception
system - The system. If the system specifies localhost, the message is written
to the job log of the process from which this method is called.
Otherwise the message is written to the QZRCSRVS job.messageID - The message ID. The message must be in the default message file
/QSYS.LIB/QCPFMSG.MSGF.messageType - The message type. Possible values are:
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.ProgramCall.isStayOnThread()
public static void writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
byte[] substitutionData)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
AS400Exception
system - The system. If the system specifies localhost, the message is written
to the job log of the process from which this method is called.
Otherwise the message is written to the QZRCSRVS job.messageID - The message ID. The message must be in the default message file
/QSYS.LIB/QCPFMSG.MSGF.messageType - The message type. Possible values are:
substitutionData - The substitution data. The substitution data can be from 0-32767 bytes
for a conventional message and from 1-6000 bytes for an immediate message.
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.ProgramCall.isStayOnThread()
public static void writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
AS400Exception
system - The system. If the system specifies localhost, the message is written
to the job log of the process from which this method is called.
Otherwise the message is written to the QZRCSRVS job.messageID - The message ID.messageType - The message type. Possible values are:
messageFile - The integrated file system path name of the message file.
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.ProgramCall.isStayOnThread()
public static void writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile,
byte[] substitutionData)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
AS400Exception
system - The system. If the system specifies localhost, the message is written
to the job log of the process from which this method is called.
Otherwise the message is written to the QZRCSRVS job.messageID - The message ID.messageType - The message type. Possible values are:
messageFile - The integrated file system path name of the message file.substitutionData - The substitution data. The substitution data can be from 0-32767 bytes
for a conventional message and from 1-6000 bytes for an immediate message.
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.ProgramCall.isStayOnThread()
public static void writeMessage(AS400 system,
java.lang.String messageID,
int messageType,
java.lang.String messageFile,
byte[] substitutionData,
boolean onThread)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException,
AS400Exception
system - The system. The system cannot be null.messageID - The message ID. The message ID cannot be null.messageType - The message type. Possible values are:
messageFile - The integrated file system path name of the message file. If null is specified,
the message file used is /QSYS.LIB/QCPFMSG.MSGF.substitutionData - The substitution data. The substitution data can be from 0-32767 bytes
for a conventional message and from 1-6000 bytes for an immediate message. If null
is specified, no substitution data is used.onThread - Whether or not to stay on thread when calling the API to write the message
to the job log. true to write the message to the current job's job log, false
to write the message to the Remote Command Host Server job's job log. Note
that this parameter is meaningless unless this Java program is running on
the iSeries server and the system object is using native optimizations.
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.ProgramCall.isStayOnThread()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||