org.attoparser
Interface ITimedDocumentHandling

All Known Implementing Classes:
AbstractAttoHandler, AbstractBasicMarkupAttoHandler, AbstractDetailedMarkupAttoHandler, AbstractStandardMarkupAttoHandler, DOMMarkupAttoHandler, DuplicatingBasicMarkupAttoHandler, DuplicatingDetailedMarkupAttoHandler, TracingBasicMarkupAttoHandler, 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)
           Called at the end of document parsing, adding timing information.
 void handleDocumentStart(long startTimeNanos)
           Called at the beginning of document parsing, adding timing information.
 

Method Detail

handleDocumentStart

void handleDocumentStart(long startTimeNanos)
                         throws AttoParseException

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

Parameters:
startTimeNanos - the current time (in nanoseconds) obtained when parsing starts.
Throws:
AttoParseException

handleDocumentEnd

void handleDocumentEnd(long endTimeNanos,
                       long totalTimeNanos)
                       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)
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.