tigase.server.websocket

## Class WebSocketXMPPIOService<RefObject>

- java.lang.Object
- - tigase.net.IOService<RefObject>
  - - tigase.xmpp.XMPPIOService<RefObject>
    - - tigase.server.websocket.WebSocketXMPPIOService<RefObject>

- Type Parameters:
    `RefObject` -
  All Implemented Interfaces:
    Callable<IOService<?>>, TLSEventHandler

      public class WebSocketXMPPIOService<RefObject>
      extends XMPPIOService<RefObject>

  Class implements basic support for WebSocket protocol. It extends XMPPIOService so it can be used instead of XMPPIOService in ClientConnectionManager to allow web clients to connect to it without using BOSH extension.

- - ### Field Summary

    - ### Fields inherited from class tigase.xmpp.XMPPIOService

      `ACK_NAME, CROSS_DOMAIN_POLICY_FILE_PROP_KEY, CROSS_DOMAIN_POLICY_FILE_PROP_VAL, ID_ATT, parser, REQ_NAME, writeInProgress`

    - ### Fields inherited from class tigase.net.IOService

      `cb, CERT_CHECK_RESULT, decoder, encoder, HOSTNAME_KEY, partialCharacterBytes, PORT_TYPE_PROP_KEY, SESSION_ID_KEY, SSL_PROTOCOLS_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketXMPPIOService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dumpHeaders(Map<String,String> headers)`
    `protected char[]` | `readData()` Custom implementation of readData function which decodes WebSocket protocol frames
    `protected void` | `writeData(String data)` Custom implementation of writeData function which encodes data in WebSocket protocol frames

    - ### Methods inherited from class tigase.xmpp.XMPPIOService

      `addPacketToSend, addReceivedPacket, checkData, forceStop, getPacketsReceived, getPacketsSent, getReceivedPackets, getTotalPacketsReceived, getTotalPacketsSent, getUserJid, getWaitingForAct, getXMLNS, processSocketData, processWaitingPackets, receivedPackets, setAckMode, setIOServiceListener, setProcessors, setUserJid, setXMLNS, stop, toString, writeRawData, xmppStreamClosed, xmppStreamOpen, xmppStreamOpened`

    - ### Methods inherited from class tigase.net.IOService

      `accept, byteOrder, call, connectionType, debug, debug, getBuffOverflow, getBytesReceived, getBytesSent, getConnectionId, getDataReceiver, getLastTransferTime, getLocalAddress, getPeersJIDsFromCert, getReadCounters, getRefObject, getRemoteAddress, getSessionData, getSocketChannel, getStatistics, getTotalBuffOverflow, getTotalBytesReceived, getTotalBytesSent, getUniqueId, getWriteCounters, getX509TrustManagers, handshakeCompleted, isConnected, isInputBufferEmpty, readBytes, readCompleted, setConnectionId, setDataReceiver, setIOServiceListener, setRefObject, setSessionData, setX509TrustManagers, startSSL, startTLS, startZLib, waitingToRead, waitingToSend, waitingToSendSize, writeBytes`

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

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

- - ### Constructor Detail

    - #### WebSocketXMPPIOService

          public WebSocketXMPPIOService()

  - ### Method Detail

    - #### readData

          protected char[] readData()
                             throws IOException

      Custom implementation of readData function which decodes WebSocket protocol frames
      Overrides:
        `readData` in class `IOService<RefObject>`
      Returns:
      Throws:
        `IOException`

    - #### writeData

          protected void writeData(String data)

      Custom implementation of writeData function which encodes data in WebSocket protocol frames
      Overrides:
        `writeData` in class `IOService<RefObject>`
      Parameters:
        `data` -

    - #### dumpHeaders

          public void dumpHeaders(Map<String,String> headers)

Copyright © 2013 Tigase. All rights reserved.