Package tigase.xmpp.impl

## Class LastActivityAbstract

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

- All Implemented Interfaces:
    `java.lang.Comparable<XMPPImplIfc>`, `XMPPImplIfc`, `XMPPProcessorConcurrencyAwareIfc`, `XMPPProcessorIfc`
  Direct Known Subclasses:
    `LastActivityMarker`

      public abstract class LastActivityAbstract
      extends AnnotatedXMPPProcessor
      implements XMPPProcessorIfc

  Implementation of XEP-0012: Last Activity.
  Author:
    bmalkow

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `LAST_ACTIVITY_KEY` |
    `static java.lang.String` | `LAST_PRESENCE_KEY` |
    `static java.lang.String` | `LAST_SHOW_KEY` |
    `static java.lang.String` | `LAST_STATUS_KEY` |
    `static java.lang.String[]` | `SHOW_PATH` |
    `static java.lang.String[]` | `STATUS_PATH` |
    `protected static java.lang.String` | `XMLNS` |

    - ### 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 | Description
    --- | ---
    `LastActivityAbstract()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected static long` | `getLastActivity​(NonAuthUserRepository repo, BareJID requestedJid)` |
    `static long` | `getLastActivity​(XMPPResourceConnection session, boolean global)` |
    `protected static long` | `getLastActivity​(XMPPResourceConnection session, Packet packet)` |
    `protected java.util.Optional<Element>` | `getPresence​(NonAuthUserRepository repo, BareJID requestedJid)` |
    `protected static java.lang.String` | `getShow​(NonAuthUserRepository repo, BareJID requestedJid)` |
    `protected static java.lang.String` | `getShow​(XMPPResourceConnection session)` |
    `protected static java.lang.String` | `getStatus​(NonAuthUserRepository repo, BareJID requestedJid)` |
    `protected static java.lang.String` | `getStatus​(XMPPResourceConnection session)` |
    `protected static java.lang.String` | `getType​(NonAuthUserRepository repo, BareJID requestedJid)` |
    `protected static java.lang.String` | `getType​(XMPPResourceConnection session)` |
    `protected static void` | `persistLastActivity​(XMPPResourceConnection session, Element presence)` |

    - ### Methods inherited from class tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor

      `id, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes`

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

      `canHandle, compareTo, concurrentQueuesNo, getComponentInfo, getInstance, getQueueSize, getStatistics, getThreadsNo, init, toString`

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

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

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

      `compareTo`

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

      `canHandle, concurrentQueuesNo, getComponentInfo, getStatistics, id, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes`

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

      `process`

- - ### Field Detail

    - #### XMLNS

          protected static final java.lang.String XMLNS

      See Also:
        Constant Field Values

    - #### LAST_ACTIVITY_KEY

          public static final java.lang.String LAST_ACTIVITY_KEY

      See Also:
        Constant Field Values

    - #### LAST_STATUS_KEY

          public static final java.lang.String LAST_STATUS_KEY

      See Also:
        Constant Field Values

    - #### LAST_SHOW_KEY

          public static final java.lang.String LAST_SHOW_KEY

      See Also:
        Constant Field Values

    - #### LAST_PRESENCE_KEY

          public static final java.lang.String LAST_PRESENCE_KEY

      See Also:
        Constant Field Values

    - #### STATUS_PATH

          public static final java.lang.String[] STATUS_PATH

    - #### SHOW_PATH

          public static final java.lang.String[] SHOW_PATH

  - ### Constructor Detail

    - #### LastActivityAbstract

          public LastActivityAbstract()

  - ### Method Detail

    - #### getLastActivity

          protected static long getLastActivity​(NonAuthUserRepository repo,
                                                BareJID requestedJid)
                                         throws UserNotFoundException

      Throws:
        `UserNotFoundException`

    - #### getLastActivity

          public static long getLastActivity​(XMPPResourceConnection session,
                                             boolean global)

    - #### getLastActivity

          protected static long getLastActivity​(XMPPResourceConnection session,
                                                Packet packet)

    - #### getStatus

          protected static java.lang.String getStatus​(XMPPResourceConnection session)

    - #### getShow

          protected static java.lang.String getShow​(XMPPResourceConnection session)

    - #### getShow

          protected static java.lang.String getShow​(NonAuthUserRepository repo,
                                                    BareJID requestedJid)
                                             throws UserNotFoundException

      Throws:
        `UserNotFoundException`

    - #### getType

          protected static java.lang.String getType​(XMPPResourceConnection session)

    - #### getType

          protected static java.lang.String getType​(NonAuthUserRepository repo,
                                                    BareJID requestedJid)
                                             throws UserNotFoundException

      Throws:
        `UserNotFoundException`

    - #### getPresence

          protected java.util.Optional<Element> getPresence​(NonAuthUserRepository repo,
                                                            BareJID requestedJid)
                                                     throws UserNotFoundException

      Throws:
        `UserNotFoundException`

    - #### getStatus

          protected static java.lang.String getStatus​(NonAuthUserRepository repo,
                                                      BareJID requestedJid)
                                               throws UserNotFoundException

      Throws:
        `UserNotFoundException`

    - #### persistLastActivity

          protected static void persistLastActivity​(XMPPResourceConnection session,
                                                    Element presence)