tigase.jaxmpp.j2se.connectors.websocket

## Class WebSocketConnector

- java.lang.Object
- - tigase.jaxmpp.core.client.connector.AbstractWebSocketConnector
  - - tigase.jaxmpp.j2se.connectors.websocket.WebSocketConnector

- All Implemented Interfaces:
    Connector

      public class WebSocketConnector
      extends AbstractWebSocketConnector

  Author:
    andrzej

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface tigase.jaxmpp.core.client.Connector

      `Connector.ConnectedHandler, Connector.DisconnectedHandler, Connector.EncryptionEstablishedHandler, Connector.ErrorHandler, Connector.StanzaReceivedHandler, Connector.StanzaSendingHandler, Connector.State, Connector.StateChangedHandler, Connector.StreamRestartedHandler, Connector.StreamTerminatedHandler`

  - ### Field Summary

    - ### Fields inherited from class tigase.jaxmpp.core.client.connector.AbstractWebSocketConnector

      `context, FORCE_RFC_KEY, log, rfcCompatible`

    - ### Fields inherited from interface tigase.jaxmpp.core.client.Connector

      `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 Summary

    Constructors
    Constructor and Description
    `WebSocketConnector(Context context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class tigase.jaxmpp.core.client.connector.AbstractWebSocketConnector

      `createSessionLogic, fireOnConnected, fireOnError, fireOnStanzaReceived, fireOnTerminate, getState, getTimeout, handleSeeOtherHost, handleSeeOtherUri, isCompressed, isRfc, keepalive, onError, onStreamStart, onStreamTerminate, processElement, restartStream, setStage, stop, stop, terminateStream`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WebSocketConnector

          public WebSocketConnector(Context context)

  - ### Method Detail

    - #### getKeyManagers

          protected KeyManager[] getKeyManagers()
                                         throws NoSuchAlgorithmException

      Throws:
        `NoSuchAlgorithmException`

    - #### isSecure

          public boolean isSecure()

      Description copied from interface: `Connector`
      Returns connection security state.
      Returns:
        `true> if connection is secured and encrypted.`

    - #### onErrorInThread

          protected void onErrorInThread(Exception e)
                                  throws JaxmppException

      Throws:
        `JaxmppException`

    - #### send

          protected void send(byte[] buffer)
                       throws JaxmppException

      Throws:
        `JaxmppException`

    - #### send

          public void send(Element stanza)
                    throws JaxmppException

      Description copied from interface: `Connector`
      Sends given XML Element to server.
      Specified by:
        `send` in interface `Connector`
      Overrides:
        `send` in class `AbstractWebSocketConnector`
      Parameters:
        `stanza` - XML element to send.
      Throws:
        `JaxmppException`

    - #### send

          public void send(String data)
                    throws JaxmppException

      Specified by:
        `send` in class `AbstractWebSocketConnector`
      Throws:
        `JaxmppException`

    - #### start

          public void start()
                     throws JaxmppException

      Description copied from interface: `Connector`
      Starts connector. If connector is properly configured it will tries to establsh connection with server.
      Specified by:
        `start` in interface `Connector`
      Overrides:
        `start` in class `AbstractWebSocketConnector`
      Throws:
        `JaxmppException`

    - #### terminateAllWorkers

          protected void terminateAllWorkers()
                                      throws JaxmppException

      Specified by:
        `terminateAllWorkers` in class `AbstractWebSocketConnector`
      Throws:
        `JaxmppException`

Copyright © 2006–2023 Tigase. All rights reserved.