public static class SockJsConfig.Builder extends Object
| Constructor and Description |
|---|
SockJsConfig.Builder(String prefix)
The prefix, or name, of the service.
|
| Modifier and Type | Method and Description |
|---|---|
SockJsConfig |
build()
Builds Config with the previously set values.
|
SockJsConfig.Builder |
cookiesNeeded()
Determines if a
JSESSIONID cookie will be set. |
SockJsConfig.Builder |
disableWebSocket()
Will disable WebSocket suppport.
|
SockJsConfig.Builder |
heartbeatInterval(long ms)
Specifies a heartbeat interval.
|
SockJsConfig.Builder |
keyStore(String keyStore)
Specifies the keystore to be used if transport layer security (TLS) is enabled.
|
SockJsConfig.Builder |
keyStorePassword(String password)
Specifies the keystore password to be used if transport layer security (TLS) is enabled.
|
SockJsConfig.Builder |
maxStreamingBytesSize(int max)
The max number of types that a streaming transport protocol should allow to be returned
before closing the connection, forcing the client to reconnect.
|
SockJsConfig.Builder |
sessionTimeout(long ms)
The max number of types that a streaming transport protocol should allow to be returned
before closing the connection, forcing the client to reconnect.
|
SockJsConfig.Builder |
sockJsUrl(String sockJsUrl)
The url to the sock-js-
|
SockJsConfig.Builder |
tls(boolean tls)
Determines whether transport layer security (TLS) should be used.
|
SockJsConfig.Builder |
webSocketHeartbeatInterval(long ms)
Specifies a heartbeat interval for SockJS WebSocket transport.
|
SockJsConfig.Builder |
webSocketProtocols(String... protocols)
Adds the given protocols which will be returned to during the
Http upgrade request as the header 'WebSocket-Protocol'.
|
public SockJsConfig.Builder(String prefix)
prefix - the prefix/name of the SockJS service.public SockJsConfig.Builder disableWebSocket()
public SockJsConfig.Builder webSocketHeartbeatInterval(long ms)
ms - how often that a WebSocket heartbeat should be sentpublic SockJsConfig.Builder webSocketProtocols(String... protocols)
protocols - the protocols that are supported.public SockJsConfig.Builder cookiesNeeded()
JSESSIONID cookie will be set. This is used by some
load balancers to enable session stickyness.public SockJsConfig.Builder sockJsUrl(String sockJsUrl)
sockJsUrl - the url to the sockjs version to be used.public SockJsConfig.Builder sessionTimeout(long ms)
ms - the max number of bytes that can be written. Default is 131072.public SockJsConfig.Builder heartbeatInterval(long ms)
ms - how often that a heartbeat should be sentpublic SockJsConfig.Builder maxStreamingBytesSize(int max)
max - the max number of bytes that can be written. Default is 131072.public SockJsConfig.Builder tls(boolean tls)
tls - if transport layer security should be used.public SockJsConfig.Builder keyStore(String keyStore)
keyStore - the keystore to be used when TLS is enabled.public SockJsConfig.Builder keyStorePassword(String password)
password - the keystore password to be used when TLS is enabled.public SockJsConfig build()
SockJsConfig the configuration for the SockJS service.Copyright © 2014 JBoss by Red Hat. All Rights Reserved.