Package org.jivesoftware.openfire
Class OfflineMessageStrategy
- java.lang.Object
-
- org.jivesoftware.openfire.container.BasicModule
-
- org.jivesoftware.openfire.OfflineMessageStrategy
-
- All Implemented Interfaces:
Module
,ServerFeaturesProvider
public class OfflineMessageStrategy extends BasicModule implements ServerFeaturesProvider
Controls what is done with offline messages.- Author:
- Iain Shigeoka
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OfflineMessageStrategy.Type
Strategy types.
-
Constructor Summary
Constructors Constructor Description OfflineMessageStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addListener(OfflineMessageListener listener)
Registers a listener to receive events.Iterator<String>
getFeatures()
Returns an Iterator (of String) with the supported features by the server.int
getQuota()
OfflineMessageStrategy.Type
getType()
void
initialize(XMPPServer server)
Initializes the basic module.static void
removeListener(OfflineMessageListener listener)
Unregisters a listener to receive events.void
setQuota(int quota)
void
setType(OfflineMessageStrategy.Type type)
void
storeOffline(org.xmpp.packet.Message message)
-
Methods inherited from class org.jivesoftware.openfire.container.BasicModule
destroy, getName, start, stop
-
-
-
-
Method Detail
-
getQuota
public int getQuota()
-
setQuota
public void setQuota(int quota)
-
getType
public OfflineMessageStrategy.Type getType()
-
setType
public void setType(OfflineMessageStrategy.Type type)
-
storeOffline
public void storeOffline(org.xmpp.packet.Message message)
-
addListener
public static void addListener(OfflineMessageListener listener)
Registers a listener to receive events.- Parameters:
listener
- the listener.
-
removeListener
public static void removeListener(OfflineMessageListener listener)
Unregisters a listener to receive events.- Parameters:
listener
- the listener.
-
initialize
public void initialize(XMPPServer server)
Description copied from class:BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
- Specified by:
initialize
in interfaceModule
- Overrides:
initialize
in classBasicModule
- Parameters:
server
- the server hosting this module.
-
getFeatures
public Iterator<String> getFeatures()
Description copied from interface:ServerFeaturesProvider
Returns an Iterator (of String) with the supported features by the server. The features to include are the features offered and supported protocols by the SERVER. The idea is that different modules may provide their features that will ultimately be part of the features offered by the server.- Specified by:
getFeatures
in interfaceServerFeaturesProvider
- Returns:
- an Iterator (of String) with the supported features by the server.
-
-