Class ServerSentEventSettings

java.lang.Object
org.apache.pekko.http.javadsl.settings.ServerSentEventSettings
Direct Known Subclasses:
ServerSentEventSettings

public abstract class ServerSentEventSettings extends Object
Public API but not intended for subclassing

Options that are in "preview" or "early access" mode. These options may change and/or be removed within patch releases without early notice (e.g. by moving them into a stable supported place).

  • Constructor Details

    • ServerSentEventSettings

      public ServerSentEventSettings()
  • Method Details

    • create

      public static ServerSentEventSettings create(org.apache.pekko.actor.ActorSystem system)
      Creates an instance of ServerSentEventSettings using the configuration provided by the given ActorSystem. Java API
      Parameters:
      system - (undocumented)
      Returns:
      (undocumented)
    • create

      public static ServerSentEventSettings create(com.typesafe.config.Config config)
      Creates an instance of ServerSentEventSettings using the given Config. Java API
      Parameters:
      config - (undocumented)
      Returns:
      (undocumented)
    • create

      public static ServerSentEventSettings create(String configOverrides)
      Create an instance of ServerSentEventSettings using the given String of config overrides to override settings set in the class loader of this class. Java API
      Parameters:
      configOverrides - (undocumented)
      Returns:
      (undocumented)
    • maxEventSize

      public abstract int maxEventSize()
      The maximum size for parsing server-sent events
      Returns:
      (undocumented)
    • maxLineSize

      public abstract int maxLineSize()
      The maximum size for parsing lines of a server-sent event
      Returns:
      (undocumented)
    • emitEmptyEvents

      public abstract boolean emitEmptyEvents()
      Should events with empty data field be passed to the application.
      Returns:
      (undocumented)
    • getOversizedLineStrategy

      public String getOversizedLineStrategy()
      How to handle lines that exceed max-line-size limit. Valid options: "fail-stream", "log-and-skip", "truncate", "dead-letter"
      Returns:
      (undocumented)
      Since:
      1.3.0
    • getOversizedLineStrategyEnum

      public OversizedSseStrategy getOversizedLineStrategyEnum()
      How to handle lines that exceed max-line-size limit. Returns the strategy as a Java enum.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • getOversizedEventStrategy

      public String getOversizedEventStrategy()
      How to handle events that exceed max-event-size limit. Valid options: "fail-stream", "log-and-skip", "truncate", "dead-letter"
      Returns:
      (undocumented)
      Since:
      1.3.0
    • getOversizedEventStrategyEnum

      public OversizedSseStrategy getOversizedEventStrategyEnum()
      How to handle events that exceed max-event-size limit. Returns the strategy as a Java enum.
      Returns:
      (undocumented)
      Since:
      1.3.0
    • withMaxEventSize

      public ServerSentEventSettings withMaxEventSize(int newValue)
    • withLineLength

      public ServerSentEventSettings withLineLength(int newValue)
    • withEmitEmptyEvents

      public ServerSentEventSettings withEmitEmptyEvents(boolean newValue)
    • withOversizedLineStrategy

      public ServerSentEventSettings withOversizedLineStrategy(String newValue)
      Parameters:
      newValue - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • withOversizedLineStrategy

      public ServerSentEventSettings withOversizedLineStrategy(OversizedSseStrategy newValue)
      Parameters:
      newValue - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • withOversizedEventStrategy

      public ServerSentEventSettings withOversizedEventStrategy(String newValue)
      Parameters:
      newValue - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0
    • withOversizedEventStrategy

      public ServerSentEventSettings withOversizedEventStrategy(OversizedSseStrategy newValue)
      Parameters:
      newValue - (undocumented)
      Returns:
      (undocumented)
      Since:
      1.3.0