tigase.xmpp.impl

## Class DomainFilter

- java.lang.Object
- - tigase.xmpp.XMPPProcessor
  - - tigase.xmpp.impl.DomainFilter

- All Implemented Interfaces:
    Comparable<XMPPImplIfc>, XMPPImplIfc, XMPPPacketFilterIfc, XMPPPreprocessorIfc

      public class DomainFilter
      extends XMPPProcessor
      implements XMPPPacketFilterIfc, XMPPPreprocessorIfc

  Created: Dec 30, 2008 12:43:28 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ALLOWED_DOMAINS_KEY` Field description
    `static String` | `ALLOWED_DOMAINS_LIST_KEY` Field description

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

      `ALL_NAMES, ALL_PATHS, cmpInfo`

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

      `CLIENT_XMLNS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DomainFilter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `filter(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results)` Method description
    `DomainFilterPolicy` | `getDomains(XMPPResourceConnection session)` Method description
    `String[]` | `getDomainsList(XMPPResourceConnection session)` Method description
    `String` | `id()` Describe `id` method here.
    `boolean` | `preProcess(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results, Map<String,Object> settings)` Method description
    `String[][]` | `supElementNamePaths()` Method description
    `String[]` | `supNamespaces()` Describe `supNamespaces` method here.

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

      `canHandle, compareTo, concurrentQueuesNo, concurrentThreadsPerQueue, getComponentInfo, getInstance, getStatistics, init, isSupporting, supDiscoFeatures, supElements, supStreamFeatures, supTypes, 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

      `canHandle, concurrentQueuesNo, concurrentThreadsPerQueue, getComponentInfo, getStatistics, init, isSupporting, supDiscoFeatures, supElements, supStreamFeatures, supTypes`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### ALLOWED_DOMAINS_KEY

          public static final String ALLOWED_DOMAINS_KEY

      Field description
      See Also:
        Constant Field Values

    - #### ALLOWED_DOMAINS_LIST_KEY

          public static final String ALLOWED_DOMAINS_LIST_KEY

      Field description
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DomainFilter

          public DomainFilter()

  - ### Method Detail

    - #### filter

          public void filter(Packet packet,
                    XMPPResourceConnection session,
                    NonAuthUserRepository repo,
                    Queue<Packet> results)

      Method description
      Specified by:
        `filter` in interface `XMPPPacketFilterIfc`
      Parameters:
        `packet` -
        `session` -
        `repo` -
        `results` -

    - #### id

          public String id()

      Describe `id` method here.
      Specified by:
        `id` in interface `XMPPImplIfc`
      Returns:
        a `String` value

    - #### preProcess

          public boolean preProcess(Packet packet,
                           XMPPResourceConnection session,
                           NonAuthUserRepository repo,
                           Queue<Packet> results,
                           Map<String,Object> settings)

      Method description
      Specified by:
        `preProcess` in interface `XMPPPreprocessorIfc`
      Parameters:
        `packet` -
        `session` -
        `repo` -
        `results` -
        `settings` -
      Returns:
        the pre-processing result; if the value is ‘true’ then the packet is blocked and no further processing is performed.

    - #### supElementNamePaths

          public String[][] supElementNamePaths()

      Method description
      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()

      Describe `supNamespaces` method here.
      Specified by:
        `supNamespaces` in interface `XMPPImplIfc`
      Overrides:
        `supNamespaces` in class `XMPPProcessor`
      Returns:
        a `String[]` value

    - #### getDomains

          public DomainFilterPolicy getDomains(XMPPResourceConnection session)
                                        throws NotAuthorizedException,
                                               TigaseDBException

      Method description
      Parameters:
        `session` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getDomainsList

          public String[] getDomainsList(XMPPResourceConnection session)
                                  throws NotAuthorizedException,
                                         TigaseDBException

      Method description
      Parameters:
        `session` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

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