public final class BoshConnection extends AbstractConnection
The implementation of XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH) and XEP-0206: XMPP Over BOSH.
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<java.lang.Void> |
closeFuture() |
long |
detach()
Detaches this BOSH session without closing (aka terminating) it.
|
void |
flush() |
java.net.InetSocketAddress |
getRemoteAddress() |
java.lang.String |
getRoute()
Gets the route.
|
java.lang.String |
getSessionId()
Gets the session id of this BOSH connection.
|
boolean |
isSecure() |
boolean |
isUsingAcknowledgements() |
java.util.concurrent.CompletionStage<java.lang.Void> |
open(SessionOpen sessionOpen) |
java.util.concurrent.CompletableFuture<java.lang.Void> |
send(StreamElement element) |
java.lang.String |
toString() |
java.util.concurrent.CompletableFuture<java.lang.Void> |
write(StreamElement streamElement) |
close, closeAsync, closeAsync, getConfiguration, getStreamIdpublic final java.util.concurrent.CompletionStage<java.lang.Void> open(SessionOpen sessionOpen)
public final boolean isSecure()
public final java.util.concurrent.CompletionStage<java.lang.Void> closeFuture()
public final long detach()
Detaches this BOSH session without closing (aka terminating) it. This way the BOSH session is still alive on the server and can be ported over to a web page, but new BOSH requests are no longer sent by this connection.
public final java.util.concurrent.CompletableFuture<java.lang.Void> send(StreamElement element)
public final java.util.concurrent.CompletableFuture<java.lang.Void> write(StreamElement streamElement)
public final void flush()
public final java.lang.String getSessionId()
Gets the session id of this BOSH connection.
public final java.net.InetSocketAddress getRemoteAddress()
public final boolean isUsingAcknowledgements()
isUsingAcknowledgements in interface ConnectionisUsingAcknowledgements in class AbstractConnectionpublic final java.lang.String getRoute()
Gets the route.
A connection manager MAY be configured to enable sessions with more than one server in different domains. When requesting a session with such a “proxy” connection manager, a client SHOULD include a ‘route’ attribute that specifies the protocol, hostname, and port of the server with which it wants to communicate, formatted as “proto:host:port” (e.g., “xmpp:example.com:9999”).
public final java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2018 XMPP.rocks. All rights reserved.