|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.trace.MQeTraceRenderer
Provides a programmatic way of managing a collection of tracePointGroups and tracePoints information.
It provides methods to add or remove tracePointGroups, individual tracePoints to and from the collection of tracePointGroups and collection of tracePoints.
Constructor Summary | |
MQeTraceRenderer()
Simple constructor to construct a renderer object with predefined list of tracePoints and tracePointGroups. |
Method Summary | |
boolean |
addGroup(MQeTracePointGroup newGroup)
Adds a tracePoint sub-group to this renderer. |
static java.lang.String |
getBuildName()
Provides the version details (build name) of the data used by this class. |
static short[] |
getBuildVersion()
Provides the version details (product release number) of the data used by this class. |
static MQeTracePointGroup |
getGroup(java.lang.String key)
Retrieves a single tracePointGroup. |
static MQeTracePointGroup[] |
getGroups()
Retrieves a list of all the logical tracePointGroups. |
java.lang.String |
getMessage(short msgNumber,
java.lang.Object[] args)
Given a message number and a collection of object references, returns a readable English string. |
MQeTracePoint |
getTracePoint(short msgNumber)
Retrieves information about a particular tracePoint if it exists in any of the available tracePointGroup lists. |
void |
loadResourceTable()
A method which actually loads the resource file, creats a new tracePoint for each of the keys present in this resource file and adds it to the collection of tracePoints. |
boolean |
removeGroup(MQeTracePointGroup group)
Removes a tracePointGroup from this renderer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MQeTraceRenderer()
Method Detail |
public void loadResourceTable()
public boolean addGroup(MQeTracePointGroup newGroup)
newGroup
- An MQeTracePointGroup object that may contain its member tracePoints.
public boolean removeGroup(MQeTracePointGroup group)
group
- An MQeTracePointGroup object that is to be removed.
public static MQeTracePointGroup[] getGroups()
public static MQeTracePointGroup getGroup(java.lang.String key)
public MQeTracePoint getTracePoint(short msgNumber)
msgNumber
- A short integer indicating the message number of the tracePoint
object to be rendered.
public java.lang.String getMessage(short msgNumber, java.lang.Object[] args) throws java.lang.Exception
This will work for any tracePoint which is a member of any of the tracePointGroups added to this renderer.
The object array passed will be used to insert strings into the trace message. For example, if the trace string is "Here. name=#0 age=#1 weight=#2" and an array { "mike" , "36!" , "not telling" } is supplied then output of "Here. name=mike age=36! weight=not telling" would be returned.
Extra parameters supplied, without matching #'s in the trace message are ignored.
If not enough parameters are supplied, and the number of #'s exceed the elements of the object array passed, then those elements supplied will be substituted for, and those #'s left over will remain as # characters.
During the course of rendering to a single string result, the toString() method of each element of the args array. If any throwable problem results, then the name of the exception will be substituted for the # character, and it will continue.
If null is returned from any of the toString() method calls, then the # character will be substituted for "null".
If the args object is null, then it is treated as if there are no substitutions to perform on the messaqe template.
msgNumber
- A short value relating to a tracePoint.args
- A java.lang.Object Contains an array of objects.
Each object reference provides parameters for substitution.
java.lang.Exception
public static java.lang.String getBuildName()
Note that this information pertains to the data which this class manipulates and returns, not to the version of trace data you are decoding, or the version of the TracePoint class itself.
To obtain the best results from the trace mechanism, we recommend that you try to match this number with that provided by the readme of the product.
public static short[] getBuildVersion()
Note that this information pertains to the data which this class manipulates and returns, not to the version of trace data you are decoding, or the version of the TracePoint class itself.
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |