Class WebSocketSettings
java.lang.Object
org.apache.pekko.http.scaladsl.settings.WebSocketSettings
- All Implemented Interfaces:
WebSocketSettings
- Direct Known Subclasses:
WebSocketSettingsImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Supplier<org.apache.pekko.util.ByteString>The provided supplier will be invoked for each new keep-alive frame that is sent.abstract booleanabstract scala.Function0<org.apache.pekko.util.ByteString>The provided function will be invoked for each new keep-alive frame that is sent.abstract scala.concurrent.duration.Durationabstract Stringabstract scala.Function0<Random>abstract scala.concurrent.duration.DurationMaximum allowable time between two consecutive frames being received.abstract scala.concurrent.duration.DurationMaximum allowable time between two consecutive frames being sent.withLogFrames(boolean shouldLog) withPeriodicKeepAliveData(scala.Function0<org.apache.pekko.util.ByteString> newValue) withPeriodicKeepAliveMaxIdle(scala.concurrent.duration.Duration newValue) withPeriodicKeepAliveMode(String newValue) withRandomFactoryFactory(Supplier<Random> newValue) withReceiveIdleTimeout(scala.concurrent.duration.Duration newValue) withSendIdleTimeout(scala.concurrent.duration.Duration newValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.javadsl.settings.WebSocketSettings
getPeriodicKeepAliveMaxIdle, getReceiveIdleTimeout, getSendIdleTimeout, withPeriodicKeepAliveData, withPeriodicKeepAliveMaxIdle, withReceiveIdleTimeout, withSendIdleTimeout
-
Constructor Details
-
WebSocketSettings
public WebSocketSettings()
-
-
Method Details
-
getPeriodicKeepAliveData
Description copied from interface:WebSocketSettingsThe provided supplier 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:
getPeriodicKeepAliveDatain interfaceWebSocketSettings- Returns:
- (undocumented)
-
getRandomFactory
- Specified by:
getRandomFactoryin interfaceWebSocketSettings
-
logFrames
public abstract boolean logFrames()- Specified by:
logFramesin interfaceWebSocketSettings
-
periodicKeepAliveData
public abstract scala.Function0<org.apache.pekko.util.ByteString> periodicKeepAliveData()The 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.- Returns:
- (undocumented)
-
periodicKeepAliveMaxIdle
public abstract scala.concurrent.duration.Duration periodicKeepAliveMaxIdle()- Specified by:
periodicKeepAliveMaxIdlein interfaceWebSocketSettings
-
periodicKeepAliveMode
- Specified by:
periodicKeepAliveModein interfaceWebSocketSettings
-
randomFactory
-
receiveIdleTimeout
public abstract 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- Returns:
- (undocumented)
- Since:
- 2.0.0
-
sendIdleTimeout
public abstract 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- Returns:
- (undocumented)
- Since:
- 2.0.0
-
withLogFrames
- Specified by:
withLogFramesin interfaceWebSocketSettings
-
withPeriodicKeepAliveData
public WebSocketSettings withPeriodicKeepAliveData(scala.Function0<org.apache.pekko.util.ByteString> newValue) -
withPeriodicKeepAliveMaxIdle
- Specified by:
withPeriodicKeepAliveMaxIdlein interfaceWebSocketSettings
-
withPeriodicKeepAliveMode
- Specified by:
withPeriodicKeepAliveModein interfaceWebSocketSettings
-
withRandomFactoryFactory
- Specified by:
withRandomFactoryFactoryin interfaceWebSocketSettings
-
withReceiveIdleTimeout
- Specified by:
withReceiveIdleTimeoutin interfaceWebSocketSettings- Parameters:
newValue- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.0.0
-
withSendIdleTimeout
- Specified by:
withSendIdleTimeoutin interfaceWebSocketSettings- Parameters:
newValue- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.0.0
-