

Public Member Functions | |
| ACSLogParserVTD () throws Exception | |
| synchronized ILogEntry | parse (String xmlString) throws LogParseException |
Private Member Functions | |
| void | initReflection () throws Exception |
| Vector< AdditionalData > | getAdditionalData (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 | |
| static final Object[] | nullObj = new Object[0] |
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.
| alma::acs::logging::engine::parser::ACSLogParserVTD::ACSLogParserVTD | ( | ) | throws Exception [inline] |
Constructor.
References initReflection().
| 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.
| vn | an instance of a VTDNav object to use in ascertaining the entry type of the log that is being parsed. |
LogTypeHelper denoting the type of entry (e.g. INFO, DEBUG, WARNING, etc.)null if the entry does not match with any log type | NavException | if the VTDNav navigation fails for some reason. |
| 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)
| 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. |
| NavException | if navigation encounters problems |
References NAV_FIRST_CHILD, and VTDNav_toElement_String.
| 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)
| 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. |
| 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
| vn | The VTDNav |
| 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)
| 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. |
| 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)
| 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. |
| 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.
| Exception | If fails instantiating fields and methods |
References NAV_FIRST_CHILD, NAV_NEXT_SIBLING, NAV_ROOT, vtdGen, VTDGen_clear, VTDGen_getNav, VTDGen_parse, VTDGen_setDoc, VTDNav_getAttrCount, VTDNav_getAttrVal, VTDNav_getText, VTDNav_getTokenCount, VTDNav_getTokenLength, VTDNav_getTokenOffset, VTDNav_hasAttr, VTDNav_matchElement, VTDNav_toElement, VTDNav_toElement_String, VTDNav_toNormalizedString, and VTDNav_toString.
Referenced by ACSLogParserVTD().
| 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.
| 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 |
| 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.
| xmlString | the XML string to parse |
| LogParseException | when problems are encountered parsing an XML message. |
Implements alma::acs::logging::engine::parser::ACSLogParser.
GETNav.FIRST_CHILD
Referenced by getAdditionalData(), and initReflection().
GETNav.NEXT_SIBLING
Referenced by initReflection().
GETNav.ROOT
Referenced by initReflection().
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
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_clear = null [private] |
VTDGen.clear();
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_getNav = null [private] |
VTDGen.getNav();
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_parse = null [private] |
VTDGen.parse(boolean);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDGen_setDoc = null [private] |
VTDGen.setDoc(byte[]);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getAttrCount = null [private] |
VTDNav.getAttrCount();
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getAttrVal = null [private] |
VTDNav.getAttrVal(String);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getText = null [private] |
VTDNav.getText();
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenCount = null [private] |
VTDNav.getTokenCount();
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenLength = null [private] |
VTDNav.getTokenLength(int);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_getTokenOffset = null [private] |
VTDNav.getTokenOffset(int);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_hasAttr = null [private] |
VTDNav.hasAttr(String)
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_matchElement = null [private] |
VTDNav.matchElement(String)
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toElement = null [private] |
VTDNav.toElement(int)
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toElement_String = null [private] |
VTDNav.toElement(int,String)
Referenced by getAdditionalData(), and initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toNormalizedString = null [private] |
VTDNav.toNormalizedStringgetTokenLength(int);
Referenced by initReflection().
Method alma::acs::logging::engine::parser::ACSLogParserVTD::VTDNav_toString = null [private] |
VTDNav.toString(int)
Referenced by initReflection().
1.6.2