Class SpincastUndertowConfigDefault
java.lang.Object
org.spincast.plugins.undertow.config.SpincastUndertowConfigDefault
- All Implemented Interfaces:
SpincastUndertowConfig
Default configuration for Spincast Undertow plugin.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe encoding the use to parse the data from HTML forms.int
The number of milliseconds to sleep between two validations that all endpoints are closed properly before calling the killing server.stop() method.int
The number of seconds max to wait for all endpoints to be closed properly before calling the killing server.stop() method.int
When the automatic WebSocket pings are enabled, this is the interval (in seconds) between two pings.int
The default code to use when sending a "closing Websocket connection" event to a peer.The default reason to use when sending a "closing Websocket connection" event to a peer.The ping text to use.TheThreadFactory
to use to create threads when sending WebSocket events to the application.int
The maximum number of concurrent threads used when sending WebSocket events to the application.int
The timeoutamount
before cancelling a task when sending WebSocket events to the application.The timeoutTimeUnit
before cancelling a task when sending WebSocket events to the application.boolean
ShouldLearningPushHandler
be enabled?boolean
Iftrue
, pings will automatically be sent to peers of a WebSocket endpoint as an heartbeat.
-
Constructor Details
-
SpincastUndertowConfigDefault
public SpincastUndertowConfigDefault()
-
-
Method Details
-
getWebsocketPingMessageString
Description copied from interface:SpincastUndertowConfig
The ping text to use. Must be< 125
characters. Defaults to"__ping"
- Specified by:
getWebsocketPingMessageString
in interfaceSpincastUndertowConfig
-
isWebsocketAutomaticPing
public boolean isWebsocketAutomaticPing()Description copied from interface:SpincastUndertowConfig
Iftrue
, pings will automatically be sent to peers of a WebSocket endpoint as an heartbeat. Enabled by default.- Specified by:
isWebsocketAutomaticPing
in interfaceSpincastUndertowConfig
-
getWebsocketAutomaticPingIntervalSeconds
public int getWebsocketAutomaticPingIntervalSeconds()Description copied from interface:SpincastUndertowConfig
When the automatic WebSocket pings are enabled, this is the interval (in seconds) between two pings. Defaults to20
seconds.- Specified by:
getWebsocketAutomaticPingIntervalSeconds
in interfaceSpincastUndertowConfig
-
getWebsocketDefaultClosingCode
public int getWebsocketDefaultClosingCode()Description copied from interface:SpincastUndertowConfig
The default code to use when sending a "closing Websocket connection" event to a peer. Valid codes can be found here Defaults to1000
, a normal closure.- Specified by:
getWebsocketDefaultClosingCode
in interfaceSpincastUndertowConfig
-
getWebsocketDefaultClosingReason
Description copied from interface:SpincastUndertowConfig
The default reason to use when sending a "closing Websocket connection" event to a peer. Defaults to an empty message.- Specified by:
getWebsocketDefaultClosingReason
in interfaceSpincastUndertowConfig
-
getWebsocketThreadExecutorForAppEventsThreadNumber
public int getWebsocketThreadExecutorForAppEventsThreadNumber()Description copied from interface:SpincastUndertowConfig
The maximum number of concurrent threads used when sending WebSocket events to the application. Defaults to100
.- Specified by:
getWebsocketThreadExecutorForAppEventsThreadNumber
in interfaceSpincastUndertowConfig
-
getWebsocketThreadExecutorForAppEventsTimeoutAmount
public int getWebsocketThreadExecutorForAppEventsTimeoutAmount()Description copied from interface:SpincastUndertowConfig
The timeoutamount
before cancelling a task when sending WebSocket events to the application. Defaults to60
.- Specified by:
getWebsocketThreadExecutorForAppEventsTimeoutAmount
in interfaceSpincastUndertowConfig
-
getWebsocketThreadExecutorForAppEventsTimeoutTimeUnit
Description copied from interface:SpincastUndertowConfig
The timeoutTimeUnit
before cancelling a task when sending WebSocket events to the application. Defaults toSECONDS
.- Specified by:
getWebsocketThreadExecutorForAppEventsTimeoutTimeUnit
in interfaceSpincastUndertowConfig
-
getWebsocketThreadExecutorForAppEventsThreadFactory
Description copied from interface:SpincastUndertowConfig
TheThreadFactory
to use to create threads when sending WebSocket events to the application. Defaults tonull
.- Specified by:
getWebsocketThreadExecutorForAppEventsThreadFactory
in interfaceSpincastUndertowConfig
-
getSecondsToWaitForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer
public int getSecondsToWaitForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer()Description copied from interface:SpincastUndertowConfig
The number of seconds max to wait for all endpoints to be closed properly before calling the killing server.stop() method.- Specified by:
getSecondsToWaitForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer
in interfaceSpincastUndertowConfig
-
getMilliSecondsIncrementWhenWaitingForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer
public int getMilliSecondsIncrementWhenWaitingForWebSocketEndpointsToBeProperlyClosedBeforeKillingTheServer()Description copied from interface:SpincastUndertowConfig
The number of milliseconds to sleep between two validations that all endpoints are closed properly before calling the killing server.stop() method. -
getHtmlFormEncoding
Description copied from interface:SpincastUndertowConfig
The encoding the use to parse the data from HTML forms. Default toUTF-8
.- Specified by:
getHtmlFormEncoding
in interfaceSpincastUndertowConfig
-
isEnableLearningPushHandler
public boolean isEnableLearningPushHandler()Description copied from interface:SpincastUndertowConfig
ShouldLearningPushHandler
be enabled?http://undertow.io/blog/2015/03/25/Server-Push.html
Defaults to
false
.- Specified by:
isEnableLearningPushHandler
in interfaceSpincastUndertowConfig
-