Interface SpincastHttpClientWithWebsocketConfig
- All Superinterfaces:
SpincastHttpClientConfig
- All Known Implementing Classes:
SpincastHttpClientWithWebsocketConfigDefault
Configurations for the Spincast Http Client with WebSocket support
plugin.
We use "@ImplementedBy" to specify the default configurations
to use if none is specified in a Guice module.
-
Method Summary
Modifier and TypeMethodDescriptionintWhen automatic pings are enabled for WebSocket connections, how many seconds should be waited between two pings? Defaults to20seconds.intThe default code to send to theWebsocketClientHandlerwhen a WebSocket connection was found to be closed.The default reason to send to theWebsocketClientHandlerwhen a WebSocket connection was found to be closed.The ping text to use.TheThreadFactoryto use to create threads to send WebSocket events to theWebsocketClientHandler.intThe maximum number of concurrent threads used when sending events to theWebsocketClientHandler.intThe timeoutamountbefore cancelling a task when sending events to theWebsocketClientHandler.The timeoutTimeUnitbefore cancelling a task when sending events to theWebsocketClientHandler.booleanAre automatic pings enabled when a WebSocket connection is established? Default totrue.
-
Method Details
-
isWebsocketAutomaticPingEnabled
boolean isWebsocketAutomaticPingEnabled()Are automatic pings enabled when a WebSocket connection is established? Default totrue. -
getWebsocketAutomaticPingIntervalSeconds
int getWebsocketAutomaticPingIntervalSeconds()When automatic pings are enabled for WebSocket connections, how many seconds should be waited between two pings? Defaults to20seconds. -
getWebsocketPingMessageString
String getWebsocketPingMessageString()The ping text to use. Must be< 125characters. Defaults to"__ping" -
getWebsocketThreadExecutorForClientEventsThreadNumber
int getWebsocketThreadExecutorForClientEventsThreadNumber()The maximum number of concurrent threads used when sending events to theWebsocketClientHandler. Defaults to10. -
getWebsocketThreadExecutorForClientEventsTimeoutAmount
int getWebsocketThreadExecutorForClientEventsTimeoutAmount()The timeoutamountbefore cancelling a task when sending events to theWebsocketClientHandler. Defaults to60. -
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit
TimeUnit getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit()The timeoutTimeUnitbefore cancelling a task when sending events to theWebsocketClientHandler. Defaults toSECONDS. -
getWebsocketThreadExecutorForClientEventsThreadFactory
ThreadFactory getWebsocketThreadExecutorForClientEventsThreadFactory()TheThreadFactoryto use to create threads to send WebSocket events to theWebsocketClientHandler. Defaults tonull. -
getWebsocketDefaultClosingCode
int getWebsocketDefaultClosingCode()The default code to send to theWebsocketClientHandlerwhen a WebSocket connection was found to be closed. Valid codes can be found here Defaults to1001: "1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.." -
getWebsocketDefaultClosingReason
String getWebsocketDefaultClosingReason()The default reason to send to theWebsocketClientHandlerwhen a WebSocket connection was found to be closed. Defaults to an empty message.
-