tigase.db

## Interface MsgRepositoryIfc

- All Known Implementing Classes:
    MsgRepository

      public interface MsgRepositoryIfc

  Interface for storing and restoring offline Elements. Created: May 11, 2010 6:56:14 PM
  Author:
    Artur Hefczyc

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `tigase.xml.Element` | `getMessageExpired(long time, boolean delete)` Loads head of the payloads queue which holds items that would be expired after stated time with an option to delete them from repository after being retrieved.
    `Queue<tigase.xml.Element>` | `loadMessagesToJID(tigase.xmpp.JID to, boolean delete)` Loads all payloads for the given user's `JID` from repository.
    `void` | `storeMessage(tigase.xmpp.JID from, tigase.xmpp.JID to, Date expired, tigase.xml.Element msg)` Saves the massage to the repository

- - ### Method Detail

    - #### getMessageExpired

          tigase.xml.Element getMessageExpired(long time,
                                             boolean delete)

      Loads head of the payloads queue which holds items that would be expired after stated time with an option to delete them from repository after being retrieved.
      Parameters:
        `time` - time in milliseconds representing time after which given message would be considered as expired
        `delete` - boolean parameter controlling whether messages should be removed from repository after they retrieved.
      Returns:
        head of the payloads queue which holds items that would be expired after stated time with an option to delete them from repository after being retrieved.

    - #### loadMessagesToJID

          Queue<tigase.xml.Element> loadMessagesToJID(tigase.xmpp.JID to,
                                                    boolean delete)
                                                      throws UserNotFoundException

      Loads all payloads for the given user's `JID` from repository.
      Parameters:
        `to` - `JID` denotes address of the receiver for which payload stored in the repository should be retrieved.
        `delete` - boolean parameter controlling whether messages should be removed from repository after they retrieved.
      Returns:
        a `Queue` of `Element` objects representing stored payloads for the given user's `JID`
      Throws:
        `UserNotFoundException`

    - #### storeMessage

          void storeMessage(tigase.xmpp.JID from,
                          tigase.xmpp.JID to,
                          Date expired,
                          tigase.xml.Element msg)
                            throws UserNotFoundException

      Saves the massage to the repository
      Parameters:
        `from` - `JID` denotes address of the sender
        `to` - `JID` denotes address of the receiver
        `expired` - `Date` object denoting expiration date of the message
        `msg` - `Element` payload of the stanza to be saved
      Throws:
        `UserNotFoundException`

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