tigase.xmpp.impl.annotation

## Class AnnotatedXMPPProcessor

- java.lang.Object
- - tigase.xmpp.XMPPProcessor
  - - tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor

- All Implemented Interfaces:
    Comparable<XMPPImplIfc>, XMPPImplIfc
  Direct Known Subclasses:
    ClientStateIndication, ErrorCounter, Message, MobileV3, PresenceAbstract, SessionBind, XMPPProcessorAbstract

      public abstract class AnnotatedXMPPProcessor
      extends XMPPProcessor

  This class is extension of `XMPPProcessor` which provides support for defining processor Id, supported paths and XMLNSs and more using annotations
  Author:
    andrzej

- - ### Field Summary

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

      `ALL_NAMES, ALL_PATHS, cmpInfo`

    - ### Fields inherited from interface tigase.xmpp.XMPPImplIfc

      `CLIENT_XMLNS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AnnotatedXMPPProcessor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `id()` Method `id` returns a unique ID of the plugin.
    `Element[]` | `supDiscoFeatures(XMPPResourceConnection session)` Method `supDiscoFeatures` returns an array of XML `Element`s with service discovery features which have to be returned to the client uppon request.
    `String[][]` | `supElementNamePaths()` Method `supElementNamePaths` returns an array of element names in form of a full path to the XML element for stanzas which can be processed by this plugin.
    `String[]` | `supNamespaces()` Method `supNamespaces` returns an array of name-spaces for stanzas which can be processed by this plugin.
    `Element[]` | `supStreamFeatures(XMPPResourceConnection session)` Method `supStreamFeatures` returns an array of XML `Element`s with stream features which have to be returned to the client uppon request.
    `Set<StanzaType>` | `supTypes()` Method returns an array of all stanza types which the plugin is able to handle.

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

      `canHandle, compareTo, concurrentThreadsPerQueue, getComponentInfo, getInstance, getStatistics, init, isSupporting, supElements, toString`

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

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

    - ### Methods inherited from interface tigase.xmpp.XMPPImplIfc

      `concurrentQueuesNo`

- - ### Constructor Detail

    - #### AnnotatedXMPPProcessor

          protected AnnotatedXMPPProcessor()

  - ### Method Detail

    - #### id

          public String id()

      Description copied from interface: `XMPPImplIfc`
      Method `id` returns a unique ID of the plugin. Each plugin has own, unique ID which is used in the configuration file to determine whether it needs to be loaded or not. In most cases the ID can be equal to XMLNS of the packages processed by the plugin.
      Returns:
        a `String` value

    - #### supElementNamePaths

          public String[][] supElementNamePaths()

      Description copied from interface: `XMPPImplIfc`
      Method `supElementNamePaths` returns an array of element names in form of a full path to the XML element for stanzas which can be processed by this plugin. Each element name path corresponds to XMLNS returned in array by `supNamespaces()` method. The element path itself is represented by a String array with each path element as a separate String.
      Specified by:
        `supElementNamePaths` in interface `XMPPImplIfc`
      Overrides:
        `supElementNamePaths` in class `XMPPProcessor`
      Returns:
        a `String[][]` value is an array for element paths for which the plugin offers processing capabilities. Each path is in form of a String array in order to reduce parsing overhead.

    - #### supNamespaces

          public String[] supNamespaces()

      Description copied from interface: `XMPPImplIfc`
      Method `supNamespaces` returns an array of name-spaces for stanzas which can be processed by this plugin. Each namespace corresponds to element name returned in array by `supElemenets()` method.
      Specified by:
        `supNamespaces` in interface `XMPPImplIfc`
      Overrides:
        `supNamespaces` in class `XMPPProcessor`
      Returns:
        a `String[]` value

    - #### supDiscoFeatures

          public Element[] supDiscoFeatures(XMPPResourceConnection session)

      Description copied from interface: `XMPPImplIfc`
      Method `supDiscoFeatures` returns an array of XML `Element`s with service discovery features which have to be returned to the client uppon request. Service discovery features returned by this method correspond to services supported by this plugin.
      Specified by:
        `supDiscoFeatures` in interface `XMPPImplIfc`
      Overrides:
        `supDiscoFeatures` in class `XMPPProcessor`
      Parameters:
        `session` - a `XMPPResourceConnection` value
      Returns:
        an `Element[]` value

    - #### supStreamFeatures

          public Element[] supStreamFeatures(XMPPResourceConnection session)

      Description copied from interface: `XMPPImplIfc`
      Method `supStreamFeatures` returns an array of XML `Element`s with stream features which have to be returned to the client uppon request. Stream features returned by this method correspond to features supported by this plugin.
      Specified by:
        `supStreamFeatures` in interface `XMPPImplIfc`
      Overrides:
        `supStreamFeatures` in class `XMPPProcessor`
      Parameters:
        `session` - a `XMPPResourceConnection` value
      Returns:
        an `Element[]` value

    - #### supTypes

          public Set<StanzaType> supTypes()

      Description copied from interface: `XMPPImplIfc`
      Method returns an array of all stanza types which the plugin is able to handle. If the method returns NULL, then all stanzas of all types will be passed to the plugin for processing. Otherwise only stanzas with selected types, assuming that element names and name-spaces match as well.
      Specified by:
        `supTypes` in interface `XMPPImplIfc`
      Overrides:
        `supTypes` in class `XMPPProcessor`
      Returns:
        a `StanzaType[]` array of supported stanza types.

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