Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::logging::engine::parser::ACSLogParserVTD Class Reference

Inheritance diagram for alma::acs::logging::engine::parser::ACSLogParserVTD:

Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::engine::parser::ACSLogParserVTD:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACSLogParserVTD () throws Exception
synchronized ILogEntry parse (String xmlString) throws LogParseException

Private Member Functions

void initReflection () throws Exception
Vector< AdditionalDatagetAdditionalData (Object vNav, ByteArrayOutputStream os, byte[] bytesArray) throws Exception
String getString (Object vtdNav, ByteArrayOutputStream os, String attrName, byte[] bytesXML) throws Exception
Integer getInteger (Object vtdNav, ByteArrayOutputStream os, String attrName, byte[] bytesXML) throws Exception
Long getLongFromTimestamp (Object vtdNav, ByteArrayOutputStream os, String attrName, byte[] bytesXML) throws LogParseException, Exception
LogTypeHelper determineEntryType (Object vtdNav) throws Exception
LogEntry makeLogEntryFromParsedXML (byte[] bytesArray, String xmlString) throws LogParseException
String getLogMessage (Object vn) throws Exception

Private Attributes

Object vtdGen = null
Method VTDGen_clear = null
Method VTDGen_setDoc = null
Method VTDGen_parse = null
Method VTDGen_getNav = null
int NAV_ROOT
int NAV_FIRST_CHILD
int NAV_NEXT_SIBLING
Method VTDNav_toElement = null
Method VTDNav_toElement_String = null
Method VTDNav_matchElement = null
Method VTDNav_hasAttr = null
Method VTDNav_toString = null
Method VTDNav_getText = null
Method VTDNav_getAttrVal = null
Method VTDNav_getAttrCount = null
Method VTDNav_getTokenOffset = null
Method VTDNav_getTokenCount = null
Method VTDNav_getTokenLength = null
Method VTDNav_toNormalizedString = null

Static Private Attributes

final Object[] nullObj = new Object[0]

Detailed Description

ACSLogParserVTD uses the VTD XML parser to parse XML logs. VTD is used for performance reasons. For more information on VTD, see their web site.

Author:
sharring
See also:
http://vtd-xml.sourceforge.net/

ACSLogParser


Constructor & Destructor Documentation

alma::acs::logging::engine::parser::ACSLogParserVTD::ACSLogParserVTD  )  throws Exception [inline]
 

Constructor.


Member Function Documentation

LogTypeHelper alma::acs::logging::engine::parser::ACSLogParserVTD::determineEntryType Object  vtdNav  )  throws Exception [inline, private]
 

Returns the entry type as an Integer for the current log that is being parsed.

Parameters:
vn an instance of a VTDNav object to use in ascertaining the entry type of the log that is being parsed.
Returns:
a LogTypeHelper denoting the type of entry (e.g. INFO, DEBUG, WARNING, etc.)
null if the entry does not match with any log type
Exceptions:
NavException if the VTDNav navigation fails for some reason.
See also:
LogTypeHelper

Vector<AdditionalData> alma::acs::logging::engine::parser::ACSLogParserVTD::getAdditionalData Object  vNav,
ByteArrayOutputStream  os,
byte[]  bytesArray
throws Exception [inline, private]
 

Gets a Vector<AdditionalData> from VTD XML parser (using VTDNav navigation)

Parameters:
vtdNav the navigator to use to navigate the parsed xml
os output stream to use for conversion of bytes to useful formatted data.
bytesXML the bytes (containing XML) that are being referenced by the navigator.
Returns:
Vector<AdditionalData> populated with the additional data for the log message, if any, else null
Exceptions:
NavException if navigation encounters problems

Integer alma::acs::logging::engine::parser::ACSLogParserVTD::getInteger Object  vtdNav,
ByteArrayOutputStream  os,
String  attrName,
byte[]  bytesXML
throws Exception [inline, private]
 

Gets an Integer from VTD XML parser (using VTDNav navigation)

Parameters:
vtdNav the navigator to use to navigate the parsed xml
os output stream to use for conversion of bytes to useful formatted data.
attrName the name of the field we are searching for
bytesXML the bytes (containing XML) that are being referenced by the navigator.
Returns:
Integer populated with the attribute's value
Exceptions:
NavException if navigation encounters problems

String alma::acs::logging::engine::parser::ACSLogParserVTD::getLogMessage Object  vn  )  throws Exception [inline, private]
 

Get the body of a log.

The log message must be read with this method because of the mixed content

Parameters:
vn The VTDNav
Returns:
The message of the log
Exceptions:
Exception 

Long alma::acs::logging::engine::parser::ACSLogParserVTD::getLongFromTimestamp Object  vtdNav,
ByteArrayOutputStream  os,
String  attrName,
byte[]  bytesXML
throws LogParseException, Exception [inline, private]
 

Gets a Long from VTD XML parser (using VTDNav navigation)

Parameters:
vtdNav the navigator to use to navigate the parsed xml
os output stream to use for conversion of bytes to useful formatted data.
attrName the name of the field we are searching for
bytesXML the bytes (containing XML) that are being referenced by the navigator.
Returns:
Long populated with the attribute's value
Exceptions:
NavException if navigation encounters problems
LogParseException if parsing fails

String alma::acs::logging::engine::parser::ACSLogParserVTD::getString Object  vtdNav,
ByteArrayOutputStream  os,
String  attrName,
byte[]  bytesXML
throws Exception [inline, private]
 

Gets a String from VTD XML parser (using VTDNav navigation)

Parameters:
vtdNav the navigator to use to navigate the parsed xml
os output stream to use for conversion of bytes to useful formatted data.
attrName the name of the field we are searching for
bytesXML the bytes (containing XML) that are being referenced by the navigator.
Returns:
String populated with the attribute's value
Exceptions:
NavException if navigation encounters problems

void alma::acs::logging::engine::parser::ACSLogParserVTD::initReflection  )  throws Exception [inline, private]
 

Initialize all the fields and methods with reflection.

Exceptions:
Exception If fails instantiating fields and methods

LogEntry alma::acs::logging::engine::parser::ACSLogParserVTD::makeLogEntryFromParsedXML byte[]  bytesArray,
String  xmlString
throws LogParseException [inline, private]
 

Creates a LogEntry from raw XML, using a VTD XML parser.

Parameters:
xmlString the XML string that is being parsed.
bytesArray the array of bytes (also containing the xml string that we are parsing, in byte form) to be used by VTD.
vtdGen the instance of VTDGen to use for parsing the XML
Returns:
A LogEntry populated with the data for the log entry contained in the XML string passed in.
Exceptions:
LogParseException if the parsing fails

synchronized ILogEntry alma::acs::logging::engine::parser::ACSLogParserVTD::parse String  xmlString  )  throws LogParseException [inline, virtual]
 

Implements required method of ACSLogParser interface.

Parameters:
xmlString the XML string to parse
Exceptions:
LogParseException when problems are encountered parsing an XML message.
See also:
ACSLogParser

Implements alma::acs::logging::engine::parser::ACSLogParser.


Member Data Documentation

int alma::acs::logging::engine::parser::ACSLogParserVTD::NAV_FIRST_CHILD [private]
 

GETNav.FIRST_CHILD

int alma::acs::logging::engine::parser::ACSLogParserVTD::NAV_NEXT_SIBLING [private]
 

GETNav.NEXT_SIBLING

int alma::acs::logging::engine::parser::ACSLogParserVTD::NAV_ROOT [private]
 

GETNav.ROOT

final Object [] alma::acs::logging::engine::parser::ACSLogParserVTD::nullObj = new Object[0] [static, private]
 

Support field to pass null while reflection invokes methods having no params

Object alma::acs::logging::engine::parser::ACSLogParserVTD::vtdGen = null [private]
 

private instance of VTDGen used for parsing XML

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_clear = null [private]
 

VTDGen.clear();

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_getNav = null [private]
 

VTDGen.getNav();

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_parse = null [private]
 

VTDGen.parse(boolean);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_setDoc = null [private]
 

VTDGen.setDoc(byte[]);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getAttrCount = null [private]
 

VTDNav.getAttrCount();

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getAttrVal = null [private]
 

VTDNav.getAttrVal(String);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getText = null [private]
 

VTDNav.getText();

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenCount = null [private]
 

VTDNav.getTokenCount();

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenLength = null [private]
 

VTDNav.getTokenLength(int);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenOffset = null [private]
 

VTDNav.getTokenOffset(int);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_hasAttr = null [private]
 

VTDNav.hasAttr(String)

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_matchElement = null [private]
 

VTDNav.matchElement(String)

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toElement = null [private]
 

VTDNav.toElement(int)

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toElement_String = null [private]
 

VTDNav.toElement(int,String)

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toNormalizedString = null [private]
 

VTDNav.toNormalizedStringgetTokenLength(int);

Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toString = null [private]
 

VTDNav.toString(int)


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:51 2009 for ACS Java API by doxygen 1.3.8