Package rocks.xmpp.core.net.client
Interface TransportConnector<T extends ClientConnectionConfiguration>
-
- Type Parameters:
T- A specific configuration for the transport protocol, e.g. a configuration for TCP, BOSH or WebSocket connections.
- All Known Implementing Classes:
AbstractTcpConnector,HttpClientConnector,HttpClientWebSocketConnector,HttpUrlConnector,JakartaWebSocketConnector,NettyChannelConnector,SocketConnector
public interface TransportConnector<T extends ClientConnectionConfiguration>Transport Connectors bind XMPP to a transport protocol such as TCP, BOSH or WebSockets.Connector implementations establish a connection using a
connection configurationand a concrete transport or protocol implementation.Examples
TCP connections could be established with different low-level TCP implementations such as
SocketorSocketChannel.BOSH connections could use
HttpURLConnectionorHttpClientWebSocket connections could either use
WebSocketor the Jakarta WebSocket API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Connection>connect(XmppSession xmppSession, T configuration, SessionOpen sessionOpen)Establishes a connection using the transport protocol specific configuration.
-
-
-
Method Detail
-
connect
CompletableFuture<Connection> connect(XmppSession xmppSession, T configuration, SessionOpen sessionOpen)
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
CompletableFuturewhich returns an established (connected) connection on completion.
-
-