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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ServerSentEventSettingscreate(com.typesafe.config.Config config) Creates an instance of ServerSentEventSettings using the given Config.static ServerSentEventSettingsCreate an instance of ServerSentEventSettings using the given String of config overrides to override settings set in the class loader of this class.static ServerSentEventSettingscreate(org.apache.pekko.actor.ActorSystem system) Creates an instance of ServerSentEventSettings using the configuration provided by the given ActorSystem.abstract booleanShould 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 intThe maximum size for parsing server-sent eventsabstract intThe 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- 
ServerSentEventSettingspublic ServerSentEventSettings()
 
- 
- 
Method Details- 
createCreates an instance of ServerSentEventSettings using the configuration provided by the given ActorSystem. Java API- Parameters:
- system- (undocumented)
- Returns:
- (undocumented)
 
- 
createCreates an instance of ServerSentEventSettings using the given Config. Java API- Parameters:
- config- (undocumented)
- Returns:
- (undocumented)
 
- 
createCreate 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)
 
- 
maxEventSizepublic abstract int maxEventSize()The maximum size for parsing server-sent events- Returns:
- (undocumented)
 
- 
maxLineSizepublic abstract int maxLineSize()The maximum size for parsing lines of a server-sent event- Returns:
- (undocumented)
 
- 
emitEmptyEventspublic abstract boolean emitEmptyEvents()Should events with empty data field be passed to the application.- Returns:
- (undocumented)
 
- 
getOversizedLineStrategyHow 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
 
- 
getOversizedLineStrategyEnumHow to handle lines that exceed max-line-size limit. Returns the strategy as a Java enum.- Returns:
- (undocumented)
- Since:
- 1.3.0
 
- 
getOversizedEventStrategyHow 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
 
- 
getOversizedEventStrategyEnumHow 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
 
 
-