Package tigase.xmpp.impl

## Class C2SDeliveryErrorProcessor

- java.lang.Object
- - tigase.xmpp.impl.C2SDeliveryErrorProcessor

-     public class C2SDeliveryErrorProcessor
      extends java.lang.Object

  Class implements static methods used to create packets to resend messages undelivered to client by C2S and methods used later to distinguish if packet was resent for redelivery
  Author:
    andrzej

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `C2SDeliveryErrorProcessor()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `filter​(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, java.util.Queue<Packet> results, JID toIgnore)` | Filters packets created by processors to remove delivery-error payload
    `static void` | `filterErrorElement​(Element messageElem)` |
    `static Element` | `getDeliveryError​(Packet packet)` | Finds delivery-error element in packet and returns it
    `static boolean` | `isDeliveryError​(Packet packet)` | Checks if packet is delivery-error packet
    `static Packet` | `makeDeliveryError​(Packet packet, java.lang.Long stamp)` | Creates delivery-error packets to send to session manager to reprocess undelivered packets
    `static boolean` | `preProcess​(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, java.util.Queue<Packet> results, java.util.Map<java.lang.String,​java.lang.Object> settings, MessageDeliveryLogic messageProcessor)` | Filters packets before they are processed by processors to filter out delivery-error packets sent to bare jid if other connection is available

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

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

- - ### Field Detail

    - #### ELEM_NAME

          public static final java.lang.String ELEM_NAME

      See Also:
        Constant Field Values

    - #### XMLNS

          public static final java.lang.String XMLNS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### C2SDeliveryErrorProcessor

          public C2SDeliveryErrorProcessor()

  - ### Method Detail

    - #### filter

          public static void filter​(Packet packet,
                                    XMPPResourceConnection session,
                                    NonAuthUserRepository repo,
                                    java.util.Queue<Packet> results,
                                    JID toIgnore)

      Filters packets created by processors to remove delivery-error payload

    - #### filterErrorElement

          public static void filterErrorElement​(Element messageElem)

    - #### getDeliveryError

          public static Element getDeliveryError​(Packet packet)

      Finds delivery-error element in packet and returns it
      Returns:
        true - if packet is delivery-error

    - #### isDeliveryError

          public static boolean isDeliveryError​(Packet packet)

      Checks if packet is delivery-error packet
      Returns:
        true - if packet is delivery-error

    - #### makeDeliveryError

          public static Packet makeDeliveryError​(Packet packet,
                                                 java.lang.Long stamp)

      Creates delivery-error packets to send to session manager to reprocess undelivered packets

    - #### preProcess

          public static boolean preProcess​(Packet packet,
                                           XMPPResourceConnection session,
                                           NonAuthUserRepository repo,
                                           java.util.Queue<Packet> results,
                                           java.util.Map<java.lang.String,​java.lang.Object> settings,
                                           MessageDeliveryLogic messageProcessor)

      Filters packets before they are processed by processors to filter out delivery-error packets sent to bare jid if other connection is available