Class Report.ReportBuilder

java.lang.Object
com.comphenix.protocol.error.Report.ReportBuilder
Enclosing class:
Report

public static class Report.ReportBuilder extends Object
Must be constructed through the factory method in Report.
  • Method Details

    • type

      public Report.ReportBuilder type(ReportType type)
      Set the current report type. Cannot be NULL.
      Parameters:
      type - - report type.
      Returns:
      This builder, for chaining.
    • error

      public Report.ReportBuilder error(@Nullable Throwable exception)
      Set the current exception that occurred.
      Parameters:
      exception - - exception that occurred.
      Returns:
      This builder, for chaining.
    • messageParam

      public Report.ReportBuilder messageParam(@Nullable Object... messageParameters)
      Set the message parameters that are used to construct a message text.
      Parameters:
      messageParameters - - parameters for the report type.
      Returns:
      This builder, for chaining.
    • callerParam

      public Report.ReportBuilder callerParam(@Nullable Object... callerParameters)
      Set the parameters in the caller method. This is optional.
      Parameters:
      callerParameters - - parameters of the caller method.
      Returns:
      This builder, for chaining.
    • rateLimit

      public Report.ReportBuilder rateLimit(long rateLimit)
      Set the minimum number of nanoseconds to wait until a report of equal type and parameters is allowed to be printed again.
      Parameters:
      rateLimit - - number of nanoseconds, or 0 to disable. Cannot be negative.
      Returns:
      This builder, for chaining.
    • rateLimit

      public Report.ReportBuilder rateLimit(long rateLimit, TimeUnit rateUnit)
      Set the minimum time to wait until a report of equal type and parameters is allowed to be printed again.
      Parameters:
      rateLimit - - the time, or 0 to disable. Cannot be negative.
      rateUnit - - the unit of the rate limit.
      Returns:
      This builder, for chaining.
    • build

      public Report build()
      Construct a new report with the provided input.
      Returns:
      A new report.