public static class WebsocketListener.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowExtensions |
protected String |
bindAddress |
protected ClientWriteBufferProperties |
clientWriteBufferProperties |
protected ConnectOverloadProtectionProperties |
connectOverloadProtectionProperties |
protected String |
path |
protected Integer |
port |
protected boolean |
proxyProtocolSupported |
protected SocketOptionsProperties |
socketOptionsProperties |
protected List<String> |
subprotocols |
| Constructor and Description |
|---|
WebsocketListener.Builder() |
| Modifier and Type | Method and Description |
|---|---|
WebsocketListener.Builder |
allowExtensions(boolean allowExtensions)
Sets if websocket extensions should be allowed or not
|
WebsocketListener.Builder |
bindAddress(String bindAddress)
Sets the bind address of the websocket listener
|
WebsocketListener |
build()
Creates the Websocket Listener
|
WebsocketListener.Builder |
path(String path)
Sets the websocket path of the websocket listener
|
WebsocketListener.Builder |
port(int port)
Sets the port of the websocket listener
|
WebsocketListener.Builder |
proxyProtocolSupported(boolean proxyProtocolSupported)
Set this to true if you want this listener to support the PROXY protocol
|
WebsocketListener.Builder |
setClientWriteBufferProperties(ClientWriteBufferProperties clientWriteBufferProperties)
Set the
ClientWriteBufferProperties of this listener |
WebsocketListener.Builder |
setConnectOverloadProtectionProperties(ConnectOverloadProtectionProperties connectOverloadProtectionProperties)
Set the
ConnectOverloadProtectionProperties of this listener |
WebsocketListener.Builder |
setSocketOptionsProperties(SocketOptionsProperties socketOptionsProperties)
Set the
SocketOptionsProperties of this listener |
WebsocketListener.Builder |
setSubprotocols(List<String> subprotocols)
Sets a list of subprotocols the websocket listener should support.
|
protected Integer port
protected String bindAddress
protected String path
protected boolean allowExtensions
protected boolean proxyProtocolSupported
protected SocketOptionsProperties socketOptionsProperties
protected ConnectOverloadProtectionProperties connectOverloadProtectionProperties
protected ClientWriteBufferProperties clientWriteBufferProperties
public WebsocketListener.Builder port(int port)
port - the portpublic WebsocketListener.Builder bindAddress(String bindAddress)
bindAddress - the bind addresspublic WebsocketListener.Builder path(String path)
path - the pathpublic WebsocketListener.Builder allowExtensions(boolean allowExtensions)
allowExtensions - if websocket extensions should be allowed or notpublic WebsocketListener.Builder setSubprotocols(List<String> subprotocols)
subprotocols - a list of websocket subprotocolspublic WebsocketListener.Builder proxyProtocolSupported(boolean proxyProtocolSupported)
proxyProtocolSupported - if this listener should be able to utilize the PROXY protocolpublic WebsocketListener.Builder setSocketOptionsProperties(@Nullable SocketOptionsProperties socketOptionsProperties)
SocketOptionsProperties of this listenersocketOptionsProperties - a configuration of SocketOptionsProperties for this listener or null to use the defaultpublic WebsocketListener.Builder setConnectOverloadProtectionProperties(@Nullable ConnectOverloadProtectionProperties connectOverloadProtectionProperties)
ConnectOverloadProtectionProperties of this listenerconnectOverloadProtectionProperties - a configuration of ConnectOverloadProtectionProperties for this listener or null to deactivate connect overload protectionpublic WebsocketListener.Builder setClientWriteBufferProperties(@Nullable ClientWriteBufferProperties clientWriteBufferProperties)
ClientWriteBufferProperties of this listenerclientWriteBufferProperties - a configuration of ClientWriteBufferProperties for this listener or null to use the defaultpublic WebsocketListener build() throws IllegalStateException
IllegalStateExceptionCopyright © 2013-2018 dc-square GmbH. All Rights Reserved.