tigase.jaxmpp.core.client.connector

## Class ConnectorWrapper

- java.lang.Object
- - tigase.jaxmpp.core.client.connector.ConnectorWrapper

- All Implemented Interfaces:
    Connector

      public class ConnectorWrapper
      extends Object
      implements Connector

  Class for wrapping Connector.

- - ### 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 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
    `ConnectorWrapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `XmppSessionLogic` | `createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer)` Returns instance of XmppSessionLogic to work with this connector.
    `Connector` | `getConnector()` Returns wrapped connector.
    `Connector.State` | `getState()` Returns current State of connector.
    `boolean` | `isCompressed()` Returns XML Stream compression state.
    `boolean` | `isSecure()` Returns connection security state.
    `void` | `keepalive()` Whitespace ping.
    `void` | `restartStream()` Sends new XML Stream header.
    `void` | `send(Element stanza)` Sends given XML Element to server.
    `void` | `setConnector(Connector connector)` Sets connector to be wrapped.
    `void` | `start()` Starts connector.
    `void` | `stop()` Stops connector and closes connections.
    `void` | `stop(boolean terminate)` Stops connector.

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

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

- - ### Constructor Detail

    - #### ConnectorWrapper

          public ConnectorWrapper()

  - ### Method Detail

    - #### createSessionLogic

          public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager,
                                                     PacketWriter writer)

      Description copied from interface: `Connector`
      Returns instance of XmppSessionLogic to work with this connector.
      Specified by:
        `createSessionLogic` in interface `Connector`
      Parameters:
        `modulesManager` - module manager
        `writer` - writer
      Returns:
        XmppSessionLogic

    - #### getConnector

          public Connector getConnector()

      Returns wrapped connector.
      Returns:
        wrapped connector.

    - #### setConnector

          public void setConnector(Connector connector)

      Sets connector to be wrapped.
      Parameters:
        `connector` - connector.

    - #### getState

          public Connector.State getState()

      Description copied from interface: `Connector`
      Returns current State of connector.
      Specified by:
        `getState` in interface `Connector`
      Returns:
        State of connector.

    - #### isCompressed

          public boolean isCompressed()

      Description copied from interface: `Connector`
      Returns XML Stream compression state.
      Specified by:
        `isCompressed` in interface `Connector`
      Returns:
        `true> if XML Stream is compressed.`

    - #### isSecure

          public boolean isSecure()

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

    - #### keepalive

          public void keepalive()
                         throws JaxmppException

      Description copied from interface: `Connector`
      Whitespace ping.
      Specified by:
        `keepalive` in interface `Connector`
      Throws:
        `JaxmppException`

    - #### restartStream

          public void restartStream()
                             throws JaxmppException

      Description copied from interface: `Connector`
      Sends new XML Stream header.
      Specified by:
        `restartStream` in interface `Connector`
      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`
      Parameters:
        `stanza` - XML element to send.
      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`
      Throws:
        `JaxmppException`

    - #### stop

          public void stop()
                    throws JaxmppException

      Description copied from interface: `Connector`
      Stops connector and closes connections.
      Specified by:
        `stop` in interface `Connector`
      Throws:
        `JaxmppException`

    - #### stop

          public void stop(boolean terminate)
                    throws JaxmppException

      Description copied from interface: `Connector`
      Stops connector.
      Specified by:
        `stop` in interface `Connector`
      Parameters:
        `terminate` - if `true`then connection will be terminated immediatelly and connector will be stopped.``
      Throws:
        `JaxmppException`

Copyright © 2006–2020 Tigase. All rights reserved.