tigase.xmpp

## Class XMPPIOService<RefObject>

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

- Type Parameters:
    `RefObject` - is a reference object stored by this service. This is e reference to higher level data object keeping more information about the connection.
  All Implemented Interfaces:
    Callable<IOService<?>>, TLSEventHandler
  Direct Known Subclasses:
    BoshIOService, ComponentIOService, S2SIOService, WebSocketXMPPIOService

      public class XMPPIOService<RefObject>
      extends IOService<RefObject>

  Describe class XMPPIOService here. Created: Tue Feb 7 07:15:02 2006
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACK_NAME` Field description
    `static String` | `CROSS_DOMAIN_POLICY_FILE_PROP_KEY` Field description
    `static String` | `CROSS_DOMAIN_POLICY_FILE_PROP_VAL` Field description
    `static String` | `DOM_HANDLER` Key name of the system property for configuration protection from system overload and DOS attack.
    `static String` | `ID_ATT` Field description
    `protected tigase.xml.SimpleParser` | `parser` Field description
    `static String` | `REQ_NAME` Field description
    `ReentrantLock` | `writeInProgress` Field description

    - ### 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
    `XMPPIOService()` Creates a new `XMPPIOService` instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPacketToSend(Packet packet)` Method `addPacketToSend` adds new data which will be processed during next run.
    `protected void` | `addReceivedPacket(Packet packet)` Method `addReceivedPacket` puts processing results to queue.
    `boolean` | `checkData(char[] data)`
    `void` | `forceStop()` Method description
    `long` | `getPacketsReceived(boolean reset)` Method description
    `long` | `getPacketsSent(boolean reset)` Method description
    `Queue<Packet>` | `getReceivedPackets()` Method description
    `long` | `getTotalPacketsReceived()` Method description
    `long` | `getTotalPacketsSent()` Method description
    `String` | `getUserJid()` Method description
    `Map<String,Packet>` | `getWaitingForAct()` Method description
    `String` | `getXMLNS()` Method description
    `protected void` | `processSocketData()` Describe `processSocketData` method here.
    `void` | `processWaitingPackets()` Describe `processWaitingPackets` method here.
    `protected int` | `receivedPackets()` Method description
    `void` | `setAckMode(boolean white_char_ack, boolean xmpp_ack, boolean strict)` Method description
    `void` | `setElementLimits(int limit)`
    `void` | `setIOServiceListener(XMPPIOServiceListener servList)` Method description
    `void` | `setProcessors(XMPPIOProcessor[] processors)` Method description
    `void` | `setUserJid(String jid)` Method description
    `void` | `setXMLNS(String xmlns)` Method description
    `void` | `stop()` Describe `stop` method here.
    `String` | `toString()` Method description
    `void` | `writeRawData(String data)` Method description
    `protected void` | `xmppStreamClosed()` Method description
    `void` | `xmppStreamOpen(String data)` Method description
    `protected void` | `xmppStreamOpened(Map<String,String> attribs)` Method description

    - ### 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, readData, setConnectionId, setDataReceiver, setIOServiceListener, setRefObject, setSessionData, 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

    - #### ACK_NAME

          public static final String ACK_NAME

      Field description
      See Also:
        Constant Field Values

    - #### CROSS_DOMAIN_POLICY_FILE_PROP_KEY

          public static final String CROSS_DOMAIN_POLICY_FILE_PROP_KEY

      Field description
      See Also:
        Constant Field Values

    - #### CROSS_DOMAIN_POLICY_FILE_PROP_VAL

          public static final String CROSS_DOMAIN_POLICY_FILE_PROP_VAL

      Field description
      See Also:
        Constant Field Values

    - #### DOM_HANDLER

          public static final String DOM_HANDLER

      Key name of the system property for configuration protection from system overload and DOS attack.
      See Also:
        Constant Field Values

    - #### ID_ATT

          public static final String ID_ATT

      Field description
      See Also:
        Constant Field Values

    - #### REQ_NAME

          public static final String REQ_NAME

      Field description
      See Also:
        Constant Field Values

    - #### parser

          protected tigase.xml.SimpleParser parser

      Field description

    - #### writeInProgress

          public ReentrantLock writeInProgress

      Field description

  - ### Constructor Detail

    - #### XMPPIOService

          public XMPPIOService()

      Creates a new `XMPPIOService` instance.

  - ### Method Detail

    - #### addPacketToSend

          public void addPacketToSend(Packet packet)

      Method `addPacketToSend` adds new data which will be processed during next run. Data are kept in proper order like in FIFO queue.
      Parameters:
        `packet` - a `Packet` value of data to process.

    - #### checkData

          public boolean checkData(char[] data)
                            throws IOException

      Parameters:
        `data` -
      Returns:
        a value of `boolean`
      Throws:
        `IOException`

    - #### forceStop

          public void forceStop()

      Method description
      Overrides:
        `forceStop` in class `IOService<RefObject>`

    - #### processWaitingPackets

          public void processWaitingPackets()
                                     throws IOException

      Describe `processWaitingPackets` method here.
      Specified by:
        `processWaitingPackets` in class `IOService<RefObject>`
      Throws:
        `IOException`

    - #### stop

          public void stop()

      Describe `stop` method here.
      Overrides:
        `stop` in class `IOService<RefObject>`

    - #### toString

          public String toString()

      Method description
      Overrides:
        `toString` in class `IOService<RefObject>`
      Returns:
        a value of `String`

    - #### writeRawData

          public void writeRawData(String data)
                            throws IOException

      Method description
      Parameters:
        `data` -
      Throws:
        `IOException`

    - #### xmppStreamOpen

          public void xmppStreamOpen(String data)

      Method description
      Parameters:
        `data` -

    - #### getPacketsReceived

          public long getPacketsReceived(boolean reset)

      Method description
      Parameters:
        `reset` -
      Returns:
        a value of `long`

    - #### getPacketsSent

          public long getPacketsSent(boolean reset)

      Method description
      Parameters:
        `reset` -
      Returns:
        a value of `long`

    - #### getReceivedPackets

          public Queue<Packet> getReceivedPackets()

      Method description
      Returns:
        a value of `Queue`

    - #### getTotalPacketsReceived

          public long getTotalPacketsReceived()

      Method description
      Returns:
        a value of `long`

    - #### getTotalPacketsSent

          public long getTotalPacketsSent()

      Method description
      Returns:
        a value of `long`

    - #### getUserJid

          public String getUserJid()

      Method description
      Returns:
        a value of `String`

    - #### getWaitingForAct

          public Map<String,Packet> getWaitingForAct()

      Method description
      Returns:
        a value of `Map`

    - #### getXMLNS

          public String getXMLNS()

      Method description
      Returns:
        a value of `String`

    - #### setAckMode

          public void setAckMode(boolean white_char_ack,
                        boolean xmpp_ack,
                        boolean strict)

      Method description
      Parameters:
        `white_char_ack` -
        `xmpp_ack` -
        `strict` -

    - #### setElementLimits

          public void setElementLimits(int limit)

      Parameters:
        `limit` -

    - #### setIOServiceListener

          public void setIOServiceListener(XMPPIOServiceListener servList)

      Method description
      Parameters:
        `servList` -

    - #### setProcessors

          public void setProcessors(XMPPIOProcessor[] processors)

      Method description
      Parameters:
        `processors` - is a `XMPPIOProcessor[]`

    - #### setUserJid

          public void setUserJid(String jid)

      Method description
      Parameters:
        `jid` -

    - #### setXMLNS

          public void setXMLNS(String xmlns)

      Method description
      Parameters:
        `xmlns` -

    - #### addReceivedPacket

          protected void addReceivedPacket(Packet packet)

      Method `addReceivedPacket` puts processing results to queue. The processing results are usually data (messages) which has been just received from socket.
      Parameters:
        `packet` - a `Packet` value of processing results.

    - #### processSocketData

          protected void processSocketData()
                                    throws IOException

      Describe `processSocketData` method here.
      Specified by:
        `processSocketData` in class `IOService<RefObject>`
      Throws:
        `IOException` - if an error occurs

    - #### receivedPackets

          protected int receivedPackets()

      Method description
      Specified by:
        `receivedPackets` in class `IOService<RefObject>`
      Returns:
        a value of `int`

    - #### xmppStreamClosed

          protected void xmppStreamClosed()

      Method description

    - #### xmppStreamOpened

          protected void xmppStreamOpened(Map<String,String> attribs)

      Method description
      Parameters:
        `attribs` -

Copyright © 2014 "Tigase, Inc.". All rights reserved.