public final class BoshConnection extends Connection
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the session as described in Terminating the HTTP Session.
|
void |
connect()
Deprecated.
|
void |
connect(Jid from)
Connects to the BOSH server.
|
long |
detach()
Detaches this BOSH session without closing (aka terminating) it.
|
String |
getRoute()
Gets the route.
|
String |
getSessionId()
Gets the session id of this BOSH connection.
|
String |
getStreamId()
Gets the stream id of this connection.
|
boolean |
isSecure()
Indicates whether this connection is secured by TLS/SSL.
|
void |
send(ClientStreamElement element)
Sends an element.
|
String |
toString() |
getHostname, getPort, getProxy, getXmppSession, initialize@Deprecated public final void connect() throws IOException
Connectionconnect in class ConnectionIOException - If no connection could be established, e.g. due to unknown host.public final void connect(Jid from) throws IOException
connect in class Connectionfrom - The optional 'from' attribute in the initial BOSH session creation request.IOException - If a connection could not be established.public final boolean isSecure()
ConnectionisSecure in class Connectionpublic final void close()
throws Exception
This method can be called from different threads:
InterruptedException - If the current thread is interrupted.Exceptionpublic final long detach()
public final void send(ClientStreamElement element)
Connectionsend in class Connectionelement - The element.public final String getSessionId()
public final String getStreamId()
ConnectiongetStreamId in class Connectionpublic final String getRoute()
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").
Copyright © 2014–2015 XMPP.rocks. All rights reserved.