Websphere MQ Everyplace

com.ibm.mqe.trace
Class MQeTraceFromBinaryFile

java.lang.Object
  |
  +--com.ibm.mqe.trace.MQeTraceFromBinary
        |
        +--com.ibm.mqe.trace.MQeTraceFromBinaryFile

public class MQeTraceFromBinaryFile
extends MQeTraceFromBinary

A tool to decode a binary trace file, and render it into an English readable form.

If invoked from the command line, it is assumed that output will be directed to the System.out stream.

Errors will be directed to the System.err stream. These streams can be controlled programmatically if the published methods to this class are used.

Syntax from the command line is :

java com.ibm.mqe.trace.MQeTraceFromBinaryFile filename

where filename is the input file name which contains the binary trace output.


Field Summary
static int EXIT_CODE_FAILED
          The value returned by this tool in System.exit() if invoked from the command line, if there was an error.
static int EXIT_CODE_WORKED
          The value returned by this tool in System.exit() if invoked from the command line, if all was well.
static java.lang.String LABEL_ERROR_FILE_DOES_NOT_EXIST
           
static java.lang.String LABEL_ERROR_INVALID_FILE_FORMAT
           
static java.lang.String LABEL_ERROR_TOO_FEW_PARAMETERS
           
static java.lang.String LABEL_ERROR_UNHANDLED_EXCEPTION
           
static java.lang.String LABEL_EXCEPTION_NAME
           
static java.lang.String LABEL_FILE_NAME
           
static java.lang.String LABEL_MIN_PARAMETERS_ALLOWED
           
static java.lang.String LABEL_PARAMETERS_PASSED
           
 
Constructor Summary
MQeTraceFromBinaryFile(java.io.PrintStream out, MQeTraceRenderer renderer)
          Creates a binary trace file reader.
 
Method Summary
 boolean decodeBinaryFile(java.lang.String fileName)
          Decodes a whole binary file into readable format.
static void main(java.lang.String[] args)
          Invokes the tool from the command line.
 void setOutputStream(java.io.PrintStream out)
          Allows explicit setting of the output stream, so subsequent trace output is directed to this new stream.
 void setRenderer(MQeTraceRenderer renderer)
          Sets the trace renderer used to map from a trace message number to associated information.
 
Methods inherited from class com.ibm.mqe.trace.MQeTraceFromBinary
decodeBinary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXIT_CODE_WORKED

public static final int EXIT_CODE_WORKED
The value returned by this tool in System.exit() if invoked from the command line, if all was well.

See Also:
Constant Field Values

EXIT_CODE_FAILED

public static final int EXIT_CODE_FAILED
The value returned by this tool in System.exit() if invoked from the command line, if there was an error.

See Also:
Constant Field Values

LABEL_ERROR_TOO_FEW_PARAMETERS

public static final java.lang.String LABEL_ERROR_TOO_FEW_PARAMETERS
See Also:
Constant Field Values

LABEL_ERROR_FILE_DOES_NOT_EXIST

public static final java.lang.String LABEL_ERROR_FILE_DOES_NOT_EXIST
See Also:
Constant Field Values

LABEL_ERROR_UNHANDLED_EXCEPTION

public static final java.lang.String LABEL_ERROR_UNHANDLED_EXCEPTION
See Also:
Constant Field Values

LABEL_PARAMETERS_PASSED

public static final java.lang.String LABEL_PARAMETERS_PASSED
See Also:
Constant Field Values

LABEL_MIN_PARAMETERS_ALLOWED

public static final java.lang.String LABEL_MIN_PARAMETERS_ALLOWED
See Also:
Constant Field Values

LABEL_EXCEPTION_NAME

public static final java.lang.String LABEL_EXCEPTION_NAME
See Also:
Constant Field Values

LABEL_FILE_NAME

public static final java.lang.String LABEL_FILE_NAME
See Also:
Constant Field Values

LABEL_ERROR_INVALID_FILE_FORMAT

public static final java.lang.String LABEL_ERROR_INVALID_FILE_FORMAT
See Also:
Constant Field Values
Constructor Detail

MQeTraceFromBinaryFile

public MQeTraceFromBinaryFile(java.io.PrintStream out,
                              MQeTraceRenderer renderer)
Creates a binary trace file reader.

The trace contents found will be rendered to a readable form, and passed to the specified print stream.

Parameters:
out - The output stream to which readable trace output will be sent.
renderer - An MQeTraceRenderer object
Method Detail

main

public static void main(java.lang.String[] args)
Invokes the tool from the command line.

See MQeTraceFromBinaryFile for a description of the syntax used to invoke from the command line.


setOutputStream

public void setOutputStream(java.io.PrintStream out)
Allows explicit setting of the output stream, so subsequent trace output is directed to this new stream.

Parameters:
out - The output stream to which readable trace output will be sent.
Returns:
void

decodeBinaryFile

public boolean decodeBinaryFile(java.lang.String fileName)
Decodes a whole binary file into readable format.

Parameters:
fileName - The fully qualified file name to be decoded.
Returns:
True, if the decode of the trace file was performed without error, false otherwise.

setRenderer

public void setRenderer(MQeTraceRenderer renderer)
Sets the trace renderer used to map from a trace message number to associated information.

Parameters:
renderer - An MQeTraceRenderer object.
Returns:
void

Websphere MQ Everyplace