View Javadoc
1   package org.bitbucket.jrsofty.parser.logging.api;
2   
3   /**
4    * Log parser interface.
5    *
6    * @author jrsofty
7    *
8    */
9   public interface LogParser {
10  
11    /**
12     * Parses line of log data and returns a class that implements the LogEntry interface.
13     *
14     * @param logString
15     *          a line of log data.
16     * @return An instance of the class provided to the factory that implements the LogEntry interface
17     *         and has the LogElementMapping annotations.
18     * @throws TokenParseException
19     *           When the formatting string provided to the factory doesn't match the log string.
20     * @throws IllegalClassException
21     *           When it cannot create an instance of the LogEntry implementing class.
22     */
23    LogEntry parseLogString(String logString) throws TokenParseException, IllegalClassException;
24  }