Enum Class OversizedSseStrategy

java.lang.Object
java.lang.Enum<OversizedSseStrategy>
org.apache.pekko.http.javadsl.settings.OversizedSseStrategy
All Implemented Interfaces:
Serializable, Comparable<OversizedSseStrategy>, Constable

public enum OversizedSseStrategy extends Enum<OversizedSseStrategy>
Strategy for handling oversized SSE messages that exceed the configured max-line-size.
Since:
1.3.0
  • Enum Constant Details

    • FailStream

      public static final OversizedSseStrategy FailStream
      Fail the stream with an IllegalStateException when an oversized message is encountered. This is the default behavior to maintain backward compatibility.
    • LogAndSkip

      public static final OversizedSseStrategy LogAndSkip
      Log a warning and skip the oversized message, continuing with stream processing.
    • Truncate

      public static final OversizedSseStrategy Truncate
      Log an info message and truncate the oversized message to the configured max-line-size, continuing with stream processing.
    • DeadLetter

      public static final OversizedSseStrategy DeadLetter
      Send the oversized message to dead letters, continuing with stream processing.
  • Method Details

    • values

      public static OversizedSseStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OversizedSseStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • asScala

      public OversizedSseStrategy asScala()
      Convert this Java enum to the corresponding Scala enum value.
    • fromScala

      public static OversizedSseStrategy fromScala(OversizedSseStrategy scalaStrategy)
      Convert from a Scala enum value to the corresponding Java enum value.