com.aventstack.extentreports.reporter

## Class AbstractReporter

- java.lang.Object
- - com.aventstack.extentreports.reporter.ConfigurableReporter
  - - com.aventstack.extentreports.reporter.AbstractReporter

- All Implemented Interfaces:
    AnalysisStrategyService, ExtentReporter, TestListener
  Direct Known Subclasses:
    BasicFileReporter, ConsoleLogger, ExtentKlovReporter

      public abstract class AbstractReporter
      extends ConfigurableReporter

  A base class for all Reporter types

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Date` | `endTime`
    `protected List<Status>` | `levels`
    `protected Date` | `startTime`
    `protected List<Status>` | `statusList`

    - ### Fields inherited from class com.aventstack.extentreports.reporter.ConfigurableReporter

      `configContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractReporter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `flush(ReportAggregates reportAggregates)` Write to or update the target source (file, database)
    `AnalysisStrategy` | `getAnalysisStrategy()`
    `protected Date` | `getEndTime()`
    `String` | `getLongRunDuration()`
    `long` | `getRunDuration()`
    `protected Date` | `getStartTime()`
    `List<Status>` | `getStatusList()`
    `void` | `setAnalysisStrategy(AnalysisStrategy strategy)`
    `protected void` | `setEndTime(Date endTime)`

    - ### Methods inherited from class com.aventstack.extentreports.reporter.ConfigurableReporter

      `getConfigContext, loadConfig, loadConfig, loadConfig, loadXMLConfig, loadXMLConfig, loadXMLConfig`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.aventstack.extentreports.ExtentReporter

      `getReporterName, start, stop`

    - ### Methods inherited from interface com.aventstack.extentreports.TestListener

      `onAuthorAssigned, onCategoryAssigned, onDeviceAssigned, onLogAdded, onNodeStarted, onScreenCaptureAdded, onScreenCaptureAdded, onScreencastAdded, onTestRemoved, onTestStarted`

- - ### Field Detail

    - #### levels

          protected List<Status> levels

    - #### startTime

          protected Date startTime

    - #### endTime

          protected Date endTime

    - #### statusList

          protected List<Status> statusList

  - ### Constructor Detail

    - #### AbstractReporter

          public AbstractReporter()

  - ### Method Detail

    - #### flush

          public void flush(ReportAggregates reportAggregates)

      Description copied from interface: `ExtentReporter`
      Write to or update the target source (file, database)
      Parameters:
        `reportAggregates` - a `ReportAggregates` object

    - #### getStartTime

          protected Date getStartTime()

    - #### setEndTime

          protected void setEndTime(Date endTime)

    - #### getEndTime

          protected Date getEndTime()

    - #### setAnalysisStrategy

          public void setAnalysisStrategy(AnalysisStrategy strategy)

    - #### getAnalysisStrategy

          public AnalysisStrategy getAnalysisStrategy()

    - #### getRunDuration

          public long getRunDuration()

    - #### getLongRunDuration

          public String getLongRunDuration()

    - #### getStatusList

          public List<Status> getStatusList()

Copyright © 2018. All rights reserved.