Package tigase.http.modules
Class AbstractBareModule
- java.lang.Object
-
- tigase.http.AbstractHttpModule
-
- tigase.http.modules.AbstractBareModule
-
- All Implemented Interfaces:
Module
,tigase.kernel.beans.config.ConfigurationChangedAware
,tigase.kernel.beans.Initializable
,tigase.kernel.beans.RegistrarBean
,tigase.kernel.beans.UnregisterAware
,tigase.stats.StatisticHolder
- Direct Known Subclasses:
AbstractModule
,SetupModeRedirectModule
,SetupModule
,UserStatusEndpointModule
public abstract class AbstractBareModule extends AbstractHttpModule implements Module, tigase.kernel.beans.Initializable, tigase.kernel.beans.config.ConfigurationChangedAware, tigase.kernel.beans.UnregisterAware
Created by andrzej on 28.03.2017.
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandManager
commandManager
protected String
name
-
Fields inherited from class tigase.http.AbstractHttpModule
contextPath, httpServer, uuid, vhosts
-
Fields inherited from interface tigase.http.modules.Module
HTTP_CONTEXT_PATH_KEY, HTTP_SERVER_KEY, VHOSTS_KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractBareModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addOutPacket(tigase.server.Packet packet)
boolean
addOutPacket(tigase.server.Packet packet, Integer timeout, PacketWriter.Callback callback)
void
everyHour()
void
everyMinute()
void
everySecond()
void
executedIn(String path, long executionTime)
protected String
getComponentName()
tigase.xml.Element
getDiscoInfo(String node, boolean isAdmin)
List<tigase.xml.Element>
getDiscoItems(String node, tigase.xmpp.jid.JID jid, tigase.xmpp.jid.JID from)
String[]
getFeatures()
tigase.xmpp.jid.JID
getJid()
static <T extends Module>
TgetModuleByUUID(String uuid)
String
getName()
void
getStatistics(String compName, tigase.stats.StatisticsList list)
void
init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)
void
initBindings(Bindings binds)
void
initialize()
boolean
isAdmin(tigase.xmpp.jid.BareJID user)
boolean
processPacket(tigase.server.Packet packet)
void
setName(String name)
void
setStatisticsPrefix(String prefix)
void
start()
void
statisticExecutedIn(long executionTime)
void
stop()
-
Methods inherited from class tigase.http.AbstractHttpModule
beanConfigurationChanged, beforeUnregister, getKernel, register, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tigase.kernel.beans.config.ConfigurationChangedAware
beanConfigurationChanged
-
Methods inherited from interface tigase.http.modules.Module
getAuthRepository, getDescription, getUserRepository, isRequestAllowed
-
-
-
-
Field Detail
-
commandManager
protected CommandManager commandManager
-
name
@ConfigField(desc="Module name") protected String name
-
-
Method Detail
-
setName
public void setName(String name)
-
addOutPacket
public boolean addOutPacket(tigase.server.Packet packet)
- Specified by:
addOutPacket
in interfaceModule
-
addOutPacket
public boolean addOutPacket(tigase.server.Packet packet, Integer timeout, PacketWriter.Callback callback)
- Specified by:
addOutPacket
in interfaceModule
-
everyHour
public void everyHour()
- Specified by:
everyHour
in interfacetigase.stats.StatisticHolder
-
everyMinute
public void everyMinute()
- Specified by:
everyMinute
in interfacetigase.stats.StatisticHolder
-
everySecond
public void everySecond()
- Specified by:
everySecond
in interfacetigase.stats.StatisticHolder
-
getFeatures
public String[] getFeatures()
- Specified by:
getFeatures
in interfaceModule
-
processPacket
public boolean processPacket(tigase.server.Packet packet)
- Specified by:
processPacket
in interfaceModule
-
getDiscoInfo
public tigase.xml.Element getDiscoInfo(String node, boolean isAdmin)
- Specified by:
getDiscoInfo
in interfaceModule
-
getDiscoItems
public List<tigase.xml.Element> getDiscoItems(String node, tigase.xmpp.jid.JID jid, tigase.xmpp.jid.JID from)
- Specified by:
getDiscoItems
in interfaceModule
-
getStatistics
public void getStatistics(String compName, tigase.stats.StatisticsList list)
- Specified by:
getStatistics
in interfacetigase.stats.StatisticHolder
-
setStatisticsPrefix
public void setStatisticsPrefix(String prefix)
- Specified by:
setStatisticsPrefix
in interfacetigase.stats.StatisticHolder
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime)
- Specified by:
statisticExecutedIn
in interfacetigase.stats.StatisticHolder
-
init
public void init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)
-
initBindings
public void initBindings(Bindings binds)
- Specified by:
initBindings
in interfaceModule
-
isAdmin
public boolean isAdmin(tigase.xmpp.jid.BareJID user)
-
start
public void start()
- Specified by:
start
in interfaceModule
- Specified by:
start
in classAbstractHttpModule
-
stop
public void stop()
- Specified by:
stop
in interfaceModule
- Specified by:
stop
in classAbstractHttpModule
-
executedIn
public void executedIn(String path, long executionTime)
-
initialize
public void initialize()
- Specified by:
initialize
in interfacetigase.kernel.beans.Initializable
- Overrides:
initialize
in classAbstractHttpModule
-
getComponentName
protected String getComponentName()
-
-