- java.lang.Object
-
- com.ibm.jvm.trace.format.api.MessageFile
-
public final class MessageFile extends Object
Acts as a template for mapping trace ids to messages.
-
-
Field Summary
Fields Modifier and Type Field Description protected float
verMod
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addMessage(String messageLine)
adds a message to the table by parsing a line of the message file.boolean
componentIsFromDATFile(String componentName)
static MessageFile
getMessageFile(File file, TraceContext context)
static MessageFile
getMessageFile(InputStream stream, TraceContext context)
protected Message
getMessageFromID(int id)
retrieve the message associated with a given traceIDprotected Message
getMessageFromID(String compName, int id)
retrieve the message associated with a given traceID and componentHashMap
getStatistics()
float
getVersion()
-
-
-
Method Detail
-
getStatistics
public HashMap getStatistics()
-
getVersion
public float getVersion()
-
addMessage
protected void addMessage(String messageLine)
adds a message to the table by parsing a line of the message file. If the line has no spaces, it is determined to be a component; otherwise it contains a trace id, an entry type, and a template string (separated by spaces)- Parameters:
messageLine
- a string
-
getMessageFromID
protected Message getMessageFromID(int id)
retrieve the message associated with a given traceID- Parameters:
id
- an int that is a trace identifier- Returns:
- a message that contains the type of entry, the component for the entry and the text to be printed
-
getMessageFromID
protected Message getMessageFromID(String compName, int id)
retrieve the message associated with a given traceID and component- Parameters:
id
- an int that is a trace identifier- Returns:
- a message that contains the type of entry, the component for the entry and the text to be printed
-
componentIsFromDATFile
public boolean componentIsFromDATFile(String componentName)
-
getMessageFile
public static MessageFile getMessageFile(InputStream stream, TraceContext context) throws IOException
- Throws:
IOException
-
getMessageFile
public static MessageFile getMessageFile(File file, TraceContext context) throws IOException
- Throws:
IOException
-
-