public.javadoc.org.spincast.plugins.httpclient.websocket.SpincastHttpClientWithWebsocketConfigDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastHttpClientWithWebsocketConfigDefault (org.spincast:spincast-framework 1.0.0 API)
org.spincast.plugins.httpclient.websocket
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
Constructor and Description
SpincastHttpClientWithWebsocketConfigDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods
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 WebsocketClientHandler
when a WebSocket connection
was found to be closed.
String
getWebsocketDefaultClosingReason()
The default reason to send to the WebsocketClientHandler
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 WebsocketClientHandler
.
int
getWebsocketThreadExecutorForClientEventsThreadNumber()
The maximum number of concurrent threads used when
sending events to the WebsocketClientHandler
.
int
getWebsocketThreadExecutorForClientEventsTimeoutAmount()
The timeout amount
before cancelling a task when
sending events to the WebsocketClientHandler
.
TimeUnit
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit()
The timeout TimeUnit
before cancelling a task when
sending events to the WebsocketClientHandler
.
boolean
isWebsocketAutomaticPingEnabled()
Are automatic pings enabled when a WebSocket
connection is established?
Default to true
.
-
-
Constructor Detail
-
SpincastHttpClientWithWebsocketConfigDefault
public SpincastHttpClientWithWebsocketConfigDefault()
-
Method Detail
-
isWebsocketAutomaticPingEnabled
public boolean isWebsocketAutomaticPingEnabled()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
Are automatic pings enabled when a WebSocket
connection is established?
Default to true
.
- Specified by:
isWebsocketAutomaticPingEnabled
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketAutomaticPingIntervalSeconds
public int getWebsocketAutomaticPingIntervalSeconds()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
When automatic pings are enabled for WebSocket
connections, how many seconds should be waited
between two pings?
Defaults to 20
seconds.
- Specified by:
getWebsocketAutomaticPingIntervalSeconds
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketPingMessageString
public String getWebsocketPingMessageString()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The ping text to use. Must be < 125
characters.
Defaults to "__ping"
- Specified by:
getWebsocketPingMessageString
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsThreadNumber
public int getWebsocketThreadExecutorForClientEventsThreadNumber()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The maximum number of concurrent threads used when
sending events to the WebsocketClientHandler
.
Defaults to 10
.
- Specified by:
getWebsocketThreadExecutorForClientEventsThreadNumber
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsTimeoutAmount
public int getWebsocketThreadExecutorForClientEventsTimeoutAmount()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The timeout amount
before cancelling a task when
sending events to the WebsocketClientHandler
.
Defaults to 60
.
- Specified by:
getWebsocketThreadExecutorForClientEventsTimeoutAmount
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit
public TimeUnit getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The timeout TimeUnit
before cancelling a task when
sending events to the WebsocketClientHandler
.
Defaults to SECONDS
.
- Specified by:
getWebsocketThreadExecutorForClientEventsTimeoutTimeUnit
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketThreadExecutorForClientEventsThreadFactory
public ThreadFactory getWebsocketThreadExecutorForClientEventsThreadFactory()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The ThreadFactory
to use to create threads to send WebSocket events
to the WebsocketClientHandler
.
Defaults to null
.
- Specified by:
getWebsocketThreadExecutorForClientEventsThreadFactory
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketDefaultClosingCode
public int getWebsocketDefaultClosingCode()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The default code to send to the WebsocketClientHandler
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.."
- Specified by:
getWebsocketDefaultClosingCode
in interface SpincastHttpClientWithWebsocketConfig
-
getWebsocketDefaultClosingReason
public String getWebsocketDefaultClosingReason()
Description copied from interface: SpincastHttpClientWithWebsocketConfig
The default reason to send to the WebsocketClientHandler
when a WebSocket connection was found to be closed.
Defaults to an empty message.
- Specified by:
getWebsocketDefaultClosingReason
in interface SpincastHttpClientWithWebsocketConfig
Copyright © 2019. All rights reserved.