Class WebSocketSettingsImpl
java.lang.Object
org.apache.pekko.http.scaladsl.settings.WebSocketSettings
org.apache.pekko.http.impl.settings.WebSocketSettingsImpl
- All Implemented Interfaces:
Serializable,WebSocketSettings,scala.Equals,scala.Product
public final class WebSocketSettingsImpl
extends WebSocketSettings
implements scala.Product, Serializable
INTERNAL API
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketSettingsImpl(scala.Function0<Random> randomFactory, String periodicKeepAliveMode, scala.concurrent.duration.Duration periodicKeepAliveMaxIdle, scala.Function0<org.apache.pekko.util.ByteString> periodicKeepAliveData, boolean logFrames, WebSocketCompressionSettingsImpl compression, scala.concurrent.duration.Duration receiveIdleTimeout, scala.concurrent.duration.Duration sendIdleTimeout) -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketSettingsImplclient(com.typesafe.config.Config config) static WebSocketSettingsImplclientFromRoot(com.typesafe.config.Config root) Java APIJava APIJava APIstatic booleanbooleanscala.Function0<org.apache.pekko.util.ByteString>The provided function will be invoked for each new keep-alive frame that is sent.scala.concurrent.duration.Durationscala.Function0<Random>scala.concurrent.duration.DurationMaximum allowable time between two consecutive frames being received.scala.concurrent.duration.DurationMaximum allowable time between two consecutive frames being sent.static WebSocketSettingsImplserver(com.typesafe.config.Config config) static WebSocketSettingsImplserverFromRoot(com.typesafe.config.Config root) Methods inherited from class org.apache.pekko.http.scaladsl.settings.WebSocketSettings
getPeriodicKeepAliveData, getRandomFactory, withLogFrames, withPeriodicKeepAliveData, withPeriodicKeepAliveMaxIdle, withPeriodicKeepAliveMode, withRandomFactoryFactory, withReceiveIdleTimeout, withSendIdleTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIteratorMethods inherited from interface org.apache.pekko.http.javadsl.settings.WebSocketSettings
withPeriodicKeepAliveData, withPeriodicKeepAliveMaxIdle, withReceiveIdleTimeout, withSendIdleTimeout
-
Constructor Details
-
WebSocketSettingsImpl
public WebSocketSettingsImpl(scala.Function0<Random> randomFactory, String periodicKeepAliveMode, scala.concurrent.duration.Duration periodicKeepAliveMaxIdle, scala.Function0<org.apache.pekko.util.ByteString> periodicKeepAliveData, boolean logFrames, WebSocketCompressionSettingsImpl compression, scala.concurrent.duration.Duration receiveIdleTimeout, scala.concurrent.duration.Duration sendIdleTimeout)
-
-
Method Details
-
hasNoCustomPeriodicKeepAliveData
-
serverFromRoot
-
server
-
clientFromRoot
-
client
-
randomFactory
- Specified by:
randomFactoryin classWebSocketSettings
-
periodicKeepAliveMode
- Specified by:
periodicKeepAliveModein interfaceWebSocketSettings- Specified by:
periodicKeepAliveModein classWebSocketSettings
-
periodicKeepAliveMaxIdle
public scala.concurrent.duration.Duration periodicKeepAliveMaxIdle()- Specified by:
periodicKeepAliveMaxIdlein interfaceWebSocketSettings- Specified by:
periodicKeepAliveMaxIdlein classWebSocketSettings
-
periodicKeepAliveData
public scala.Function0<org.apache.pekko.util.ByteString> periodicKeepAliveData()Description copied from class:WebSocketSettingsThe provided function will be invoked for each new keep-alive frame that is sent. The ByteString will be included in the Ping or Pong frame sent as heartbeat, so keep in mind to keep it relatively small, in order not to make the frames too bloated.- Specified by:
periodicKeepAliveDatain classWebSocketSettings- Returns:
- (undocumented)
-
logFrames
public boolean logFrames()- Specified by:
logFramesin interfaceWebSocketSettings- Specified by:
logFramesin classWebSocketSettings
-
compression
-
receiveIdleTimeout
public scala.concurrent.duration.Duration receiveIdleTimeout()Description copied from interface:WebSocketSettingsMaximum allowable time between two consecutive frames being received. If exceeded, the WebSocket flow is failed with apekko.http.scaladsl.model.ws.WebSocketIdleTimeoutException.Duration.Infdisables the check.- Specified by:
receiveIdleTimeoutin interfaceWebSocketSettings- Specified by:
receiveIdleTimeoutin classWebSocketSettings- Returns:
- (undocumented)
-
sendIdleTimeout
public scala.concurrent.duration.Duration sendIdleTimeout()Description copied from interface:WebSocketSettingsMaximum allowable time between two consecutive frames being sent. If exceeded, the WebSocket flow is failed with apekko.http.scaladsl.model.ws.WebSocketIdleTimeoutException.Duration.Infdisables the check.- Specified by:
sendIdleTimeoutin interfaceWebSocketSettings- Specified by:
sendIdleTimeoutin classWebSocketSettings- Returns:
- (undocumented)
-
getPeriodicKeepAliveMaxIdle
Description copied from interface:WebSocketSettingsJava API- Specified by:
getPeriodicKeepAliveMaxIdlein interfaceWebSocketSettings- Returns:
- (undocumented)
-
getReceiveIdleTimeout
Description copied from interface:WebSocketSettingsJava API- Specified by:
getReceiveIdleTimeoutin interfaceWebSocketSettings- Returns:
- (undocumented)
-
getSendIdleTimeout
Description copied from interface:WebSocketSettingsJava API- Specified by:
getSendIdleTimeoutin interfaceWebSocketSettings- Returns:
- (undocumented)
-
productPrefix
- Specified by:
productPrefixin interfacescala.Product
-