public interface MsgRepositoryIfc extends Repository
Repository.Meta
Modifier and Type | Method and Description |
---|---|
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<Element> |
loadMessagesToJID(XMPPResourceConnection session,
boolean delete)
Loads all payloads for the given user's
JID from repository. |
boolean |
storeMessage(JID from,
JID to,
Date expired,
Element msg,
NonAuthUserRepository userRepo)
Saves the massage to the repository
|
initRepository
Element getMessageExpired(long time, boolean delete)
time
- time in milliseconds representing time after which given
message would be considered as expireddelete
- boolean parameter controlling whether messages should be
removed from repository after they retrieved.Queue<Element> loadMessagesToJID(XMPPResourceConnection session, boolean delete) throws UserNotFoundException
JID
from repository.session
- user session which keeps all the user session data and also
gives an access to the user's repository data.delete
- boolean parameter controlling whether messages should be
removed from repository after they retrieved.Queue
of Element
objects representing stored
payloads for the given user's JID
UserNotFoundException
boolean storeMessage(JID from, JID to, Date expired, Element msg, NonAuthUserRepository userRepo) throws UserNotFoundException
from
- JID
denotes address of the senderto
- JID
denotes address of the receiverexpired
- Date
object denoting expiration date of the messagemsg
- Element
payload of the stanza to be saveduserRepo
- NonAuthUserRepository
instance of non auth user repository
to get user settings for offline messagestrue
if the packet was correctly saved to repository,
false
otherwise.UserNotFoundException
Copyright © 2018 "Tigase, Inc.". All rights reserved.