Interface Policy.PolicyListErrorConsumer

Enclosing class:
Policy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Policy.PolicyListErrorConsumer
A callback interface for receiving errors and warnings encountered while parsing a serialized CSP list (comma-separated policies).

A valueIndex of -1 indicates that the error does not pertain to a specific value within the directive.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    PolicyListErrorConsumer ignored.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Policy.Severity severity, String message, int policyIndex, int directiveIndex, int valueIndex)
    Called when a parsing error or warning is encountered.
  • Field Details

  • Method Details

    • add

      void add(Policy.Severity severity, String message, int policyIndex, int directiveIndex, int valueIndex)
      Called when a parsing error or warning is encountered.
      Parameters:
      severity - the severity of the issue
      message - a human-readable description of the issue
      policyIndex - the zero-based index of the policy within the comma-separated list
      directiveIndex - the zero-based index of the directive within that policy
      valueIndex - the zero-based index of the value within the directive, or -1 if the issue does not pertain to a specific value