org.attoparser
Interface ITimedDocumentHandling

All Known Implementing Classes:
AbstractAttoHandler, AbstractBasicMarkupAttoHandler, AbstractDetailedMarkupAttoHandler, AbstractDetailedNonValidatingHtmlAttoHandler, AbstractDetailedXmlAttoHandler, AbstractStandardMarkupAttoHandler, AbstractStandardNonValidatingHtmlAttoHandler, AbstractStandardXmlAttoHandler, DOMXmlAttoHandler, DuplicatingBasicMarkupAttoHandler, DuplicatingDetailedMarkupAttoHandler, HtmlCodeDisplayAttoHandler, TracingBasicMarkupAttoHandler, TracingDetailedHtmlAttoHandler, TracingDetailedMarkupAttoHandler, TracingStandardMarkupAttoHandler

public interface ITimedDocumentHandling

Handler feature interface to be implemented by IAttoHandler implementations that time their execution.

All times are taken in nanoseconds.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 long getEndTimeNanos()
           Return the current time (in nanoseconds) obtained when parsing ends.
 long getStartTimeNanos()
           Return the current time (in nanoseconds) obtained when parsing starts.
 long getTotalTimeNanos()
           Return the difference (in nanoseconds) between parsing start and end times.
 void handleDocumentEnd(long endTimeNanos, long totalTimeNanos, int line, int col)
           Called at the end of document parsing, adding timing information.
 void handleDocumentStart(long startTimeNanos, int line, int col)
           Called at the beginning of document parsing, adding timing information.
 

Method Detail

handleDocumentStart

void handleDocumentStart(long startTimeNanos,
                         int line,
                         int col)
                         throws AttoParseException

Called at the beginning of document parsing, adding timing information.

Parameters:
startTimeNanos - the current time (in nanoseconds) obtained when parsing starts.
line - the line of the document where parsing starts (usually number 1)
col - the column of the document where parsing starts (usually number 1)
Throws:
AttoParseException

handleDocumentEnd

void handleDocumentEnd(long endTimeNanos,
                       long totalTimeNanos,
                       int line,
                       int col)
                       throws AttoParseException

Called at the end of document parsing, adding timing information.

Parameters:
endTimeNanos - the current time (in nanoseconds) obtained when parsing ends.
totalTimeNanos - the difference between current times at the start and end of parsing (in nanoseconds)
line - the line of the document where parsing ends (usually the last one)
col - the column of the document where the parsing ends (usually the last one)
Throws:
AttoParseException

getStartTimeNanos

long getStartTimeNanos()

Return the current time (in nanoseconds) obtained when parsing starts.

Returns:
the start time in nanos.

getEndTimeNanos

long getEndTimeNanos()

Return the current time (in nanoseconds) obtained when parsing ends.

Returns:
the end time in nanos.

getTotalTimeNanos

long getTotalTimeNanos()

Return the difference (in nanoseconds) between parsing start and end times.

Returns:
the difference between parsing start and end times.


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.