Package tigase.xmpp.impl

## Class MessageDeliveryLogic

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

- All Implemented Interfaces:
    `MessageDeliveryProviderIfc`

      @Bean(name="message-delivery-logic",
            parent=SessionManager.class,
            active=true,
            exportable=true)
      public class MessageDeliveryLogic
      extends java.lang.Object
      implements MessageDeliveryProviderIfc

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static java.lang.String` | `ELEM_NAME` |
    `static java.util.function.Predicate<XMPPResourceConnection>` | `VIABLE_FOR_MESSAGE_DELIVERY` |
    `protected static java.lang.String` | `XMLNS` |

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<XMPPResourceConnection>` | `getConnectionsForMessageDelivery​(XMPPResourceConnection session)` | Method returns list of XMPPResourceConnections to which message should be delivered for session passes as parameter if message was sent to bare JID
    `java.util.Set<JID>` | `getJIDsForMessageDelivery​(XMPPResourceConnection session)` | Method returns list of JIDs to which message should be delivered for session passes as parameter if message was sent to bare JID
    `void` | `handleDelivery​(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, java.util.Queue<Packet> results, java.util.Map<java.lang.String,​java.lang.Object> settings)` |
    `boolean` | `hasConnectionForMessageDelivery​(XMPPResourceConnection session)` | Method returns true if there is at least one XMPPResourceConnection which is allowed to receive message for XMPPResourceConnection

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

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

- - ### Field Detail

    - #### ELEM_NAME

          protected static final java.lang.String ELEM_NAME

      See Also:
        Constant Field Values

    - #### XMLNS

          protected static final java.lang.String XMLNS

      See Also:
        Constant Field Values

    - #### VIABLE_FOR_MESSAGE_DELIVERY

          public static java.util.function.Predicate<XMPPResourceConnection> VIABLE_FOR_MESSAGE_DELIVERY

  - ### Constructor Detail

    - #### MessageDeliveryLogic

          public MessageDeliveryLogic()

  - ### Method Detail

    - #### handleDelivery

          public void handleDelivery​(Packet packet,
                                     XMPPResourceConnection session,
                                     NonAuthUserRepository repo,
                                     java.util.Queue<Packet> results,
                                     java.util.Map<java.lang.String,​java.lang.Object> settings)
                              throws XMPPException

      Throws:
        `XMPPException`

    - #### getConnectionsForMessageDelivery

          public java.util.List<XMPPResourceConnection> getConnectionsForMessageDelivery​(XMPPResourceConnection session)
                                                                                  throws NotAuthorizedException

      Method returns list of XMPPResourceConnections to which message should be delivered for session passes as parameter if message was sent to bare JID
      Throws:
        `NotAuthorizedException`

    - #### getJIDsForMessageDelivery

          public java.util.Set<JID> getJIDsForMessageDelivery​(XMPPResourceConnection session)
                                                       throws NotAuthorizedException

      Method returns list of JIDs to which message should be delivered for session passes as parameter if message was sent to bare JID
      Specified by:
        `getJIDsForMessageDelivery` in interface `MessageDeliveryProviderIfc`
      Throws:
        `NotAuthorizedException`

    - #### hasConnectionForMessageDelivery

          public boolean hasConnectionForMessageDelivery​(XMPPResourceConnection session)

      Method returns true if there is at least one XMPPResourceConnection which is allowed to receive message for XMPPResourceConnection
      Specified by:
        `hasConnectionForMessageDelivery` in interface `MessageDeliveryProviderIfc`