
com.google.code.joliratools.logdb.reader.Entry Maven / Gradle / Ivy
/**
* Copyright (c) 2010 jolira. All rights reserved. This program and the accompanying materials are made available under
* the terms of the GNU Public License 2.0 which is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
package com.google.code.joliratools.logdb.reader;
import java.io.IOException;
import java.util.Map;
import com.google.code.joliratools.logdb.parser.ParseException;
import com.google.code.joliratools.logdb.parser.Record;
import com.google.code.joliratools.logdb.parser.Record.Type;
/**
* Represents an entry in a log file. This class decorates a {@link Record}.
*
* @author jfk
* @date Oct 6, 2010 8:31:56 AM
* @since 1.0
*/
public interface Entry {
/**
* @return the class name found in the header of the record. This call returns {@literal null} if {@link #getType()}
* returns {@link Type#JUNK}.
*/
public String getClazz();
/**
* @return a unique id if the type of record being recognized. This call returns {@literal null} if
* {@link #getType()} returns {@link Type#JUNK} or {@link Type#UNRECOGNIZED}.
*/
public String getId();
/**
* @return the level found in the header of the record. This call returns {@literal null} if {@link #getType()}
* returns {@link Type#JUNK}.
*/
public String getLevel();
/**
* @return the line number of the first line in the record.
*/
public int getLineNumber();
/**
* @return the method name found in the header of the record. This call returns {@literal null} if
* {@link #getType()} returns {@link Type#JUNK}.
*/
public String getMethod();
/**
* @return the row data found.
*/
public String getRaw();
/**
* @return the time stamp of the record. This call returns {@literal null} if {@link #getType()} returns
* {@link Type#JUNK}.
*/
public long getTimestamp();
/**
* @return the type of record
*/
Type getType();
/**
* @return the variables found in the data. This call returns {@literal null} if {@link #getType()} returns
* {@link Type#JUNK} or {@link Type#UNRECOGNIZED}.
* @throws ParseException
* parsing failed
* @throws IOException
* reading failed
*/
public Map getVariables() throws IOException, ParseException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy