Package tigase.server.bosh

## Class BoshIOService

- java.lang.Object
- - tigase.net.IOService<RefObject>
  - - tigase.xmpp.XMPPIOService<java.lang.Object>
    - - tigase.server.bosh.BoshIOService

- All Implemented Interfaces:
    `java.util.concurrent.Callable<IOService<?>>`, `TLSEventHandler`, `IOListener`

      public class BoshIOService
      extends XMPPIOService<java.lang.Object>

  Describe class BoshIOService here.
  Created: Tue Jun 5 22:33:18 2007
  Author:
    Artur Hefczyc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `BoshIOService.ConfigProvider` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `EOL` |

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

      `ACK_NAME, CROSS_DOMAIN_POLICY_FILE_PROP_KEY, CROSS_DOMAIN_POLICY_FILE_PROP_VAL, DOM_HANDLER, ID_ATT, parser, processors, REQ_NAME, serviceListener, STREAM_CLOSING, writeInProgress`

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

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

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BoshIOService​(BoshIOService.ConfigProvider configProvider)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `checkData​(char[] data)` |
    `protected java.lang.String` | `getCharset​(java.lang.String content_type)` |
    `protected int` | `getDataLength​(java.lang.String data, java.lang.String content_type)` |
    `long` | `getRid()` |
    `java.util.UUID` | `getSid()` |
    `BoshTask` | `getWaitTimer()` |
    `java.lang.StringBuilder` | `prepareHeaders​(java.lang.String data)` |
    `void` | `sendErrorAndStop​(Authorization errorCode, StreamError streamError, Packet packet, java.lang.String errorMsg)` |
    `void` | `setContentType​(java.lang.String ct)` |
    `void` | `setRid​(long rid)` |
    `void` | `setSid​(java.util.UUID sid)` |
    `void` | `setWaitTimer​(BoshTask timer)` |
    `void` | `writeRawData​(java.lang.String data)` |

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

      `addPacketToSend, addReceivedPacket, call, checkBufferLimit, clearWaitingPackets, forceStop, getAuthorisedUserJid, getLastXmppPacketReceiveTime, getPacketsReceived, getPacketsSent, getReceivedPackets, getTotalPacketsReceived, getTotalPacketsSent, getUserJid, getWaitingForAct, getWaitingPackets, getXMLNS, hasParsedElements, moveParsedPacketsToReceived, prepareStreamClose, processSocketData, processWaitingPackets, receivedPackets, setAckMode, setAuthorisedUserJid, setElementLimits, setIOServiceListener, setProcessors, setUserJid, setXMLNS, shouldCountPacket, stop, toString, xmppStreamClosed, xmppStreamOpen, xmppStreamOpened`

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

      `accept, byteOrder, connectionType, debug, debug, getBuffOverflow, getBytesReceived, getBytesSent, getCertificateContainer, getConnectionId, getDataReceiver, getIO, getLastTransferTime, getLocalAddress, getLocalCertificate, getLocalPort, getPeerCertificate, getReadCounters, getRefObject, getRemoteAddress, getSessionData, getSocketChannel, getSocketInputSize, getStatistics, getTlsUniqueId, getTotalBuffOverflow, getTotalBytesReceived, getTotalBytesSent, getUniqueId, getWriteCounters, handleMalformedInput, handshakeCompleted, isConnected, isInputBufferEmpty, isSocketServiceReady, readBytes, readCompleted, readData, setBufferLimit, setCertificateContainer, setConnectionId, setDataReceiver, setIOServiceListener, setRefObject, setSessionData, setSocketServiceReady, setSslContextContainer, setX509TrustManagers, startSSL, startTLS, startZLib, waitingToRead, waitingToSend, waitingToSendSize, writeBytes, writeData`

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

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

- - ### Field Detail

    - #### EOL

          public static final java.lang.String EOL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BoshIOService

          public BoshIOService​(BoshIOService.ConfigProvider configProvider)

  - ### Method Detail

    - #### getRid

          public long getRid()

    - #### setRid

          public void setRid​(long rid)

    - #### getSid

          public java.util.UUID getSid()

    - #### setSid

          public void setSid​(java.util.UUID sid)

    - #### getWaitTimer

          public BoshTask getWaitTimer()

    - #### setWaitTimer

          public void setWaitTimer​(BoshTask timer)

    - #### sendErrorAndStop

          public void sendErrorAndStop​(Authorization errorCode,
                                       StreamError streamError,
                                       Packet packet,
                                       java.lang.String errorMsg)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### setContentType

          public void setContentType​(java.lang.String ct)

    - #### prepareHeaders

          public java.lang.StringBuilder prepareHeaders​(java.lang.String data)

    - #### getDataLength

          protected int getDataLength​(java.lang.String data,
                                      java.lang.String content_type)

    - #### getCharset

          protected java.lang.String getCharset​(java.lang.String content_type)

    - #### writeRawData

          public void writeRawData​(java.lang.String data)
                            throws java.io.IOException

      Overrides:
        `writeRawData` in class `XMPPIOService<java.lang.Object>`
      Throws:
        `java.io.IOException`

    - #### checkData

          public boolean checkData​(char[] data)
                            throws java.io.IOException

      Overrides:
        `checkData` in class `XMPPIOService<java.lang.Object>`
      Throws:
        `java.io.IOException`