Package rocks.xmpp.websocket.net.client
Class WebSocketConnectionConfiguration.Builder
- java.lang.Object
-
- rocks.xmpp.core.net.client.ClientConnectionConfiguration.Builder<WebSocketConnectionConfiguration.Builder,WebSocketConnectionConfiguration>
-
- rocks.xmpp.websocket.net.client.WebSocketConnectionConfiguration.Builder
-
- Enclosing class:
- WebSocketConnectionConfiguration
public static final class WebSocketConnectionConfiguration.Builder extends ClientConnectionConfiguration.Builder<WebSocketConnectionConfiguration.Builder,WebSocketConnectionConfiguration>
A builder to create aWebSocketConnectionConfiguration
instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketConnectionConfiguration
build()
Builds the connection configuration.WebSocketConnectionConfiguration.Builder
path(String path)
Sets the path on the host, e.g.WebSocketConnectionConfiguration.Builder
pingInterval(Duration pingInterval)
Sets the ping interval.-
Methods inherited from class rocks.xmpp.core.net.client.ClientConnectionConfiguration.Builder
channelEncryption, compressionMethods, connector, connectTimeout, getConnector, hostname, hostnameVerifier, port, proxy, sslContext
-
-
-
-
Method Detail
-
path
public final WebSocketConnectionConfiguration.Builder path(String path)
Sets the path on the host, e.g. "/ws"- Parameters:
path
- The path on the host.- Returns:
- The builder.
-
pingInterval
public final WebSocketConnectionConfiguration.Builder pingInterval(Duration pingInterval)
Sets the ping interval. If not null and non-negative, a WebSocket ping is sent periodically to the server. If no pong is received within the configured response timeout (XmppSessionConfiguration.Builder.defaultResponseTimeout(Duration)
) the XMPP session is closed with an exception.- Parameters:
pingInterval
- The ping interval.- Returns:
- The builder.
- See Also:
- 5.5.2. Ping
-
build
public final WebSocketConnectionConfiguration build()
Description copied from class:ClientConnectionConfiguration.Builder
Builds the connection configuration.- Specified by:
build
in classClientConnectionConfiguration.Builder<WebSocketConnectionConfiguration.Builder,WebSocketConnectionConfiguration>
- Returns:
- The concrete connection configuration.
-
-