Package rocks.xmpp.extensions.httpbind
Class HttpUrlConnector
- java.lang.Object
-
- rocks.xmpp.extensions.httpbind.HttpUrlConnector
-
- All Implemented Interfaces:
TransportConnector<BoshConnectionConfiguration>
public final class HttpUrlConnector extends Object implements TransportConnector<BoshConnectionConfiguration>
A BOSH transport connector which usesHttpURLConnection.This is the default connector for BOSH based XMPP connections if none is defined.
Sample Usage
BoshConnectionConfiguration boshConfiguration = BoshConnectionConfiguration.builder() .hostname("localhost") .port(443) .path("/http-bind") .sslContext(sslContext) .channelEncryption(ChannelEncryption.DIRECT) .connector(new HttpUrlConnector()) .build();
-
-
Constructor Summary
Constructors Constructor Description HttpUrlConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Connection>connect(XmppSession xmppSession, BoshConnectionConfiguration configuration, SessionOpen sessionOpen)Establishes a connection using the transport protocol specific configuration.
-
-
-
Method Detail
-
connect
public final CompletableFuture<Connection> connect(XmppSession xmppSession, BoshConnectionConfiguration configuration, SessionOpen sessionOpen)
Description copied from interface:TransportConnectorEstablishes a connection using the transport protocol specific configuration.- Specified by:
connectin interfaceTransportConnector<BoshConnectionConfiguration>- 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.
-
-