Class ServerSentEventSettings
java.lang.Object
org.apache.pekko.http.javadsl.settings.ServerSentEventSettings
- Direct Known Subclasses:
ServerSentEventSettings
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerSentEventSettings
create
(com.typesafe.config.Config config) Creates an instance of ServerSentEventSettings using the given Config.static ServerSentEventSettings
Create an instance of ServerSentEventSettings using the given String of config overrides to override settings set in the class loader of this class.static ServerSentEventSettings
create
(org.apache.pekko.actor.ActorSystem system) Creates an instance of ServerSentEventSettings using the configuration provided by the given ActorSystem.abstract boolean
Should events with empty data field be passed to the application.How to handle events that exceed max-event-size limit.How to handle events that exceed max-event-size limit.How to handle lines that exceed max-line-size limit.How to handle lines that exceed max-line-size limit.abstract int
The maximum size for parsing server-sent eventsabstract int
The maximum size for parsing lines of a server-sent eventwithEmitEmptyEvents
(boolean newValue) withLineLength
(int newValue) withMaxEventSize
(int newValue) withOversizedEventStrategy
(String newValue) withOversizedLineStrategy
(String newValue)
-
Constructor Details
-
ServerSentEventSettings
public ServerSentEventSettings()
-
-
Method Details
-
create
Creates an instance of ServerSentEventSettings using the configuration provided by the given ActorSystem. Java API- Parameters:
system
- (undocumented)- Returns:
- (undocumented)
-
create
Creates an instance of ServerSentEventSettings using the given Config. Java API- Parameters:
config
- (undocumented)- Returns:
- (undocumented)
-
create
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
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
How to handle lines that exceed max-line-size limit. Returns the strategy as a Java enum.- Returns:
- (undocumented)
- Since:
- 1.3.0
-
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
How to handle events that exceed max-event-size limit. Returns the strategy as a Java enum.- Returns:
- (undocumented)
- Since:
- 1.3.0
-
withMaxEventSize
-
withLineLength
-
withEmitEmptyEvents
-
withOversizedLineStrategy
- Parameters:
newValue
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.3.0
-
withOversizedLineStrategy
- Parameters:
newValue
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.3.0
-
withOversizedEventStrategy
- Parameters:
newValue
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.3.0
-
withOversizedEventStrategy
- Parameters:
newValue
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.3.0
-