public class WebSocketConnector extends AbstractWebSocketConnector
Connector.ConnectedHandler, Connector.DisconnectedHandler, Connector.EncryptionEstablishedHandler, Connector.ErrorHandler, Connector.StanzaReceivedHandler, Connector.StanzaSendingHandler, Connector.State, Connector.StateChangedHandler, Connector.StreamTerminatedHandler
context, FORCE_RFC_KEY, log, rfcCompatible
COMPRESSED_KEY, CONNECTOR_STAGE_KEY, CONNECTOR_STAGE_TIMESTAMP_KEY, DISABLE_KEEPALIVE_KEY, ENCRYPTED_KEY, EXTERNAL_KEEPALIVE_KEY, PROXY_HOST, PROXY_PORT, PROXY_TYPE, RECONNECTING_KEY, SEE_OTHER_HOST_KEY, TRUST_MANAGERS_KEY
Constructor and Description |
---|
WebSocketConnector(Context context) |
Modifier and Type | Method and Description |
---|---|
protected KeyManager[] |
getKeyManagers() |
boolean |
isSecure()
Returns connection security state.
|
protected void |
onErrorInThread(Exception e) |
protected void |
send(byte[] buffer) |
void |
send(Element stanza)
Sends given XML Element to server.
|
void |
send(String data) |
void |
start()
Starts connector.
|
protected void |
terminateAllWorkers() |
createSessionLogic, fireOnConnected, fireOnError, fireOnStanzaReceived, fireOnTerminate, getState, handleSeeOtherHost, handleSeeOtherUri, isCompressed, isRfc, keepalive, onError, onStreamStart, onStreamTerminate, processElement, restartStream, setStage, stop, stop, terminateStream
public WebSocketConnector(Context context)
protected KeyManager[] getKeyManagers() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public boolean isSecure()
Connector
true> if connection is secured and encrypted.
protected void onErrorInThread(Exception e) throws JaxmppException
JaxmppException
protected void send(byte[] buffer) throws JaxmppException
JaxmppException
public void send(Element stanza) throws XMLException, JaxmppException
Connector
send
in interface Connector
send
in class AbstractWebSocketConnector
stanza
- XML element to send.XMLException
JaxmppException
public void send(String data) throws JaxmppException
send
in class AbstractWebSocketConnector
JaxmppException
public void start() throws XMLException, JaxmppException
Connector
start
in interface Connector
start
in class AbstractWebSocketConnector
XMLException
JaxmppException
protected void terminateAllWorkers() throws JaxmppException
terminateAllWorkers
in class AbstractWebSocketConnector
JaxmppException
Copyright © 2006–2016 Tigase. All rights reserved.