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 Object implements MessageDeliveryProviderIfc

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final String`
  `ELEM_NAME`
  `static Predicate<XMPPResourceConnection>`
  `VIABLE_FOR_MESSAGE_DELIVERY`
  `protected static final String`
  `XMLNS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessageDeliveryLogic()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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
  `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, Queue<Packet> results, Map<String,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 Details

  - ### ELEM_NAME

    protected static final String ELEM_NAME
    See Also:
      - Constant Field Values

  - ### XMLNS

    protected static final String XMLNS
    See Also:
      - Constant Field Values

  - ### VIABLE_FOR_MESSAGE_DELIVERY

    public static Predicate<XMPPResourceConnection> VIABLE_FOR_MESSAGE_DELIVERY

- ## Constructor Details

  - ### MessageDeliveryLogic

    public MessageDeliveryLogic()

- ## Method Details

  - ### handleDelivery

    public void handleDelivery(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results, Map<String,Object> settings) throws XMPPException
    Throws:
      `XMPPException`

  - ### getConnectionsForMessageDelivery

    public 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 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`