Package rocks.xmpp.websocket.net.client
Class JakartaWebSocketConnector
- java.lang.Object
-
- rocks.xmpp.websocket.net.client.JakartaWebSocketConnector
-
- All Implemented Interfaces:
TransportConnector<WebSocketConnectionConfiguration>
public final class JakartaWebSocketConnector extends Object
A WebSocket transport connector which uses Jakarta WebSocket API with Tyrus as reference implementation.Sample Usage
WebSocketConnectionConfiguration webSocketConfiguration = WebSocketConnectionConfiguration.builder() .hostname("localhost") .port(443) .sslContext(sslContext) .channelEncryption(ChannelEncryption.DIRECT) .connector(new JakartaWebSocketConnector()) .build();
-
-
Constructor Summary
Constructors Constructor Description JakartaWebSocketConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Connection>
connect(XmppSession xmppSession, WebSocketConnectionConfiguration configuration, SessionOpen sessionOpen)
Establishes a connection using the transport protocol specific configuration.
-
-
-
Method Detail
-
connect
public final CompletableFuture<Connection> connect(XmppSession xmppSession, WebSocketConnectionConfiguration configuration, SessionOpen sessionOpen)
Description copied from interface:TransportConnector
Establishes a connection using the transport protocol specific configuration.- Parameters:
xmppSession
- The XMPP session which will be bound to the transport protocol.configuration
- The connection configuration for the specific transport protocol.sessionOpen
- The session open element.- Returns:
- A
CompletableFuture
which returns an established (connected) connection on completion.
-
-