tigase.xmpp

## Class XMPPDomBuilderHandler<RefObject>

- java.lang.Object
- - tigase.xmpp.XMPPDomBuilderHandler<RefObject>

- Type Parameters:
    `RefObject` -
  All Implemented Interfaces:
    SimpleHandler

      public class XMPPDomBuilderHandler<RefObject>
      extends Object
      implements SimpleHandler

  `XMPPDomBuilderHandler` - implementation of `SimpleHandler` building DOM strctures during parsing time. It also supports creation multiple, sperate document trees if parsed buffer contains a few XML documents. As a result of work it returns always `Queue` containing all found XML trees in the same order as they were found in network data.
  Document trees created by this DOM builder consist of instances of `Element` class or instances of class extending `Element` class. To receive trees built with instances of proper class user must provide `ElementFactory` implementation creating instances of required `ELement` extension.

  Created: Sat Oct 2 22:01:34 2004

  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMPPDomBuilderHandler(XMPPIOService<RefObject> ioserv)`
    `XMPPDomBuilderHandler(XMPPIOService<RefObject> ioserv, ElementFactory factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `elementCData(StringBuilder cdata)`
    `boolean` | `endElement(StringBuilder name)`
    `void` | `error(String errorMessage)`
    `Queue<Element>` | `getParsedElements()`
    `boolean` | `isStreamClosed()`
    `void` | `otherXML(StringBuilder other)`
    `boolean` | `parseError()`
    `Object` | `restoreParserState()`
    `void` | `saveParserState(Object state)`
    `void` | `setElementsLimit(int limit)`
    `void` | `startElement(StringBuilder name, StringBuilder[] attr_names, StringBuilder[] attr_values)`

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

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

- - ### Constructor Detail

    - #### XMPPDomBuilderHandler

          public XMPPDomBuilderHandler(XMPPIOService<RefObject> ioserv)

    - #### XMPPDomBuilderHandler

          public XMPPDomBuilderHandler(XMPPIOService<RefObject> ioserv,
                                       ElementFactory factory)

  - ### Method Detail

    - #### elementCData

          public void elementCData(StringBuilder cdata)

      Specified by:
        `elementCData` in interface `SimpleHandler`

    - #### endElement

          public boolean endElement(StringBuilder name)

      Specified by:
        `endElement` in interface `SimpleHandler`

    - #### error

          public void error(String errorMessage)

      Specified by:
        `error` in interface `SimpleHandler`

    - #### getParsedElements

          public Queue<Element> getParsedElements()

    - #### isStreamClosed

          public boolean isStreamClosed()

    - #### otherXML

          public void otherXML(StringBuilder other)

      Specified by:
        `otherXML` in interface `SimpleHandler`

    - #### parseError

          public boolean parseError()

    - #### restoreParserState

          public Object restoreParserState()

      Specified by:
        `restoreParserState` in interface `SimpleHandler`

    - #### saveParserState

          public void saveParserState(Object state)

      Specified by:
        `saveParserState` in interface `SimpleHandler`

    - #### setElementsLimit

          public void setElementsLimit(int limit)

    - #### startElement

          public void startElement(StringBuilder name,
                                   StringBuilder[] attr_names,
                                   StringBuilder[] attr_values)

      Specified by:
        `startElement` in interface `SimpleHandler`

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.