|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.container.BasicModule org.jivesoftware.openfire.OfflineMessageStore
public class OfflineMessageStore
Represents the user's offline message storage. A message store holds messages that were sent to the user while they were unavailable. The user can retrieve their messages by setting their presence to "available". The messages will then be delivered normally. Offline message storage is optional, in which case a null implementation is returned that always throws UnauthorizedException when adding messages to the store.
Constructor Summary | |
---|---|
OfflineMessageStore()
Constructs a new offline message store. |
Method Summary | |
---|---|
void |
addMessage(Message message)
Adds a message to this message store. |
void |
deleteMessage(String username,
Date creationDate)
Deletes the specified offline message in the store for a user. |
void |
deleteMessages(String username)
Deletes all offline messages in the store for a user. |
static OfflineMessageStore |
getInstance()
Returns the instance of OfflineMessageStore being used by the XMPPServer. |
OfflineMessage |
getMessage(String username,
Date creationDate)
Returns the offline message of the specified user with the given creation date. |
Collection<OfflineMessage> |
getMessages(String username,
boolean delete)
Returns a Collection of all messages in the store for a user. |
int |
getSize()
Returns the approximate size (in bytes) of the XML messages stored for all users. |
int |
getSize(String username)
Returns the approximate size (in bytes) of the XML messages stored for a particular user. |
void |
start()
Starts the basic module. |
void |
stop()
Stops the basic module. |
void |
userCreated(User user,
Map params)
A user was created. |
void |
userDeleting(User user,
Map params)
A user is being deleted. |
void |
userModified(User user,
Map params)
A user's name, email, or an extended property was changed. |
Methods inherited from class org.jivesoftware.openfire.container.BasicModule |
---|
destroy, getName, initialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OfflineMessageStore()
Method Detail |
---|
public static OfflineMessageStore getInstance()
public void addMessage(Message message)
message
- the message to store.public Collection<OfflineMessage> getMessages(String username, boolean delete)
username
- the username of the user who's messages you'd like to receive.delete
- true if the offline messages should be deleted.
public OfflineMessage getMessage(String username, Date creationDate)
username
- the username of the user who's message you'd like to receive.creationDate
- the date when the offline message was stored in the database.
public void deleteMessages(String username)
username
- the username of the user who's messages are going to be deleted.public void deleteMessage(String username, Date creationDate)
username
- the username of the user who's message is going to be deleted.creationDate
- the date when the offline message was stored in the database.public int getSize(String username)
username
- the username of the user.
public int getSize()
public void userCreated(User user, Map params)
UserEventListener
userCreated
in interface UserEventListener
user
- the user.params
- event parameters.public void userDeleting(User user, Map params)
UserEventListener
userDeleting
in interface UserEventListener
user
- the user.params
- event parameters.public void userModified(User user, Map params)
UserEventListener
userModified
in interface UserEventListener
user
- the user.params
- event parameters.public void start() throws IllegalStateException
BasicModule
Starts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start
in interface Module
start
in class BasicModule
IllegalStateException
- If start is called before initialize
successfully returnspublic void stop()
BasicModule
Stops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop
in interface Module
stop
in class BasicModule
|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |