Class SpincastHttpClientWithWebsocketConfigDefault
java.lang.Object
org.spincast.plugins.httpclient.SpincastHttpClientConfigDefault
org.spincast.plugins.httpclient.websocket.SpincastHttpClientWithWebsocketConfigDefault
- All Implemented Interfaces:
SpincastHttpClientConfig,SpincastHttpClientWithWebsocketConfig
public class SpincastHttpClientWithWebsocketConfigDefault
extends SpincastHttpClientConfigDefault
implements SpincastHttpClientWithWebsocketConfig
Default configurations for the Spincast Http Client with
Websocket support plugin.
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
SpincastHttpClientWithWebsocketConfigDefault
public SpincastHttpClientWithWebsocketConfigDefault()
-
-
Method Details
-
isWebsocketAutomaticPingEnabled
public boolean isWebsocketAutomaticPingEnabled()Description copied from interface:SpincastHttpClientWithWebsocketConfigAre automatic pings enabled when a WebSocket connection is established? Default totrue.- Specified by:
isWebsocketAutomaticPingEnabledin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketAutomaticPingIntervalSeconds
public int getWebsocketAutomaticPingIntervalSeconds()Description copied from interface:SpincastHttpClientWithWebsocketConfigWhen automatic pings are enabled for WebSocket connections, how many seconds should be waited between two pings? Defaults to20seconds.- Specified by:
getWebsocketAutomaticPingIntervalSecondsin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketPingMessageString
Description copied from interface:SpincastHttpClientWithWebsocketConfigThe ping text to use. Must be< 125characters. Defaults to"__ping"- Specified by:
getWebsocketPingMessageStringin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsThreadNumber
public int getWebsocketThreadExecutorForClientEventsThreadNumber()Description copied from interface:SpincastHttpClientWithWebsocketConfigThe maximum number of concurrent threads used when sending events to theWebsocketClientHandler. Defaults to10.- Specified by:
getWebsocketThreadExecutorForClientEventsThreadNumberin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsTimeoutAmount
public int getWebsocketThreadExecutorForClientEventsTimeoutAmount()Description copied from interface:SpincastHttpClientWithWebsocketConfigThe timeoutamountbefore cancelling a task when sending events to theWebsocketClientHandler. Defaults to60.- Specified by:
getWebsocketThreadExecutorForClientEventsTimeoutAmountin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit
Description copied from interface:SpincastHttpClientWithWebsocketConfigThe timeoutTimeUnitbefore cancelling a task when sending events to theWebsocketClientHandler. Defaults toSECONDS.- Specified by:
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnitin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsThreadFactory
Description copied from interface:SpincastHttpClientWithWebsocketConfigTheThreadFactoryto use to create threads to send WebSocket events to theWebsocketClientHandler. Defaults tonull.- Specified by:
getWebsocketThreadExecutorForClientEventsThreadFactoryin interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketDefaultClosingCode
public int getWebsocketDefaultClosingCode()Description copied from interface:SpincastHttpClientWithWebsocketConfigThe 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.."- Specified by:
getWebsocketDefaultClosingCodein interfaceSpincastHttpClientWithWebsocketConfig
-
getWebsocketDefaultClosingReason
Description copied from interface:SpincastHttpClientWithWebsocketConfigThe default reason to send to theWebsocketClientHandlerwhen a WebSocket connection was found to be closed. Defaults to an empty message.- Specified by:
getWebsocketDefaultClosingReasonin interfaceSpincastHttpClientWithWebsocketConfig
-