public class SpincastHttpClientWithWebsocketConfigDefault extends SpincastHttpClientConfigDefault implements ISpincastHttpClientWithWebsocketConfig
| Constructor and Description |
|---|
SpincastHttpClientWithWebsocketConfigDefault() |
| Modifier and Type | Method and Description |
|---|---|
int |
getWebsocketAutomaticPingIntervalSeconds()
When automatic pings are enabled for WebSocket
connections, how many seconds should be waited
between two pings?
Defaults to
20 seconds. |
int |
getWebsocketDefaultClosingCode()
The default code to send to the
IWebsocketClientHandler when a WebSocket connection
was found to be closed. |
String |
getWebsocketDefaultClosingReason()
The default reason to send to the
IWebsocketClientHandler
when a WebSocket connection was found to be closed. |
String |
getWebsocketPingMessageString()
The ping text to use.
|
ThreadFactory |
getWebsocketThreadExecutorForClientEventsThreadFactory()
The
ThreadFactory to use to create threads to send WebSocket events
to the IWebsocketClientHandler. |
int |
getWebsocketThreadExecutorForClientEventsThreadNumber()
The maximum number of concurrent threads used when
sending events to the
IWebsocketClientHandler. |
int |
getWebsocketThreadExecutorForClientEventsTimeoutAmount()
The timeout
amount before cancelling a task when
sending events to the IWebsocketClientHandler. |
TimeUnit |
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit()
The timeout
TimeUnit before cancelling a task when
sending events to the IWebsocketClientHandler. |
boolean |
isWebsocketAutomaticPingEnabled()
Are automatic pings enabled when a WebSocket
connection is established?
Default to
true. |
public SpincastHttpClientWithWebsocketConfigDefault()
public boolean isWebsocketAutomaticPingEnabled()
ISpincastHttpClientWithWebsocketConfigtrue.isWebsocketAutomaticPingEnabled in interface ISpincastHttpClientWithWebsocketConfigpublic int getWebsocketAutomaticPingIntervalSeconds()
ISpincastHttpClientWithWebsocketConfig20 seconds.getWebsocketAutomaticPingIntervalSeconds in interface ISpincastHttpClientWithWebsocketConfigpublic String getWebsocketPingMessageString()
ISpincastHttpClientWithWebsocketConfig< 125 characters.
Defaults to "__ping"getWebsocketPingMessageString in interface ISpincastHttpClientWithWebsocketConfigpublic int getWebsocketThreadExecutorForClientEventsThreadNumber()
ISpincastHttpClientWithWebsocketConfigIWebsocketClientHandler.
Defaults to 10.getWebsocketThreadExecutorForClientEventsThreadNumber in interface ISpincastHttpClientWithWebsocketConfigpublic int getWebsocketThreadExecutorForClientEventsTimeoutAmount()
ISpincastHttpClientWithWebsocketConfigamount before cancelling a task when
sending events to the IWebsocketClientHandler.
Defaults to 60.getWebsocketThreadExecutorForClientEventsTimeoutAmount in interface ISpincastHttpClientWithWebsocketConfigpublic TimeUnit getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit()
ISpincastHttpClientWithWebsocketConfigTimeUnit before cancelling a task when
sending events to the IWebsocketClientHandler.
Defaults to SECONDS.getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit in interface ISpincastHttpClientWithWebsocketConfigpublic ThreadFactory getWebsocketThreadExecutorForClientEventsThreadFactory()
ISpincastHttpClientWithWebsocketConfigThreadFactory to use to create threads to send WebSocket events
to the IWebsocketClientHandler.
Defaults to null.getWebsocketThreadExecutorForClientEventsThreadFactory in interface ISpincastHttpClientWithWebsocketConfigpublic int getWebsocketDefaultClosingCode()
ISpincastHttpClientWithWebsocketConfigIWebsocketClientHandler when a WebSocket connection
was found to be closed.
Valid codes can be found here
Defaults to 1001:
"1001 indicates that an endpoint is "going away", such as a server
going down or a browser having navigated away from a page.."getWebsocketDefaultClosingCode in interface ISpincastHttpClientWithWebsocketConfigpublic String getWebsocketDefaultClosingReason()
ISpincastHttpClientWithWebsocketConfigIWebsocketClientHandler
when a WebSocket connection was found to be closed.
Defaults to an empty message.getWebsocketDefaultClosingReason in interface ISpincastHttpClientWithWebsocketConfigCopyright © 2016. All rights reserved.