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 CommandManagercommandManagerprotected Stringname-
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 booleanaddOutPacket(tigase.server.Packet packet)booleanaddOutPacket(tigase.server.Packet packet, Integer timeout, PacketWriter.Callback callback)voideveryHour()voideveryMinute()voideverySecond()voidexecutedIn(String path, long executionTime)protected StringgetComponentName()tigase.xml.ElementgetDiscoInfo(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.JIDgetJid()static <T extends Module>
TgetModuleByUUID(String uuid)StringgetName()voidgetStatistics(String compName, tigase.stats.StatisticsList list)voidinit(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)voidinitBindings(Bindings binds)voidinitialize()booleanisAdmin(tigase.xmpp.jid.BareJID user)booleanprocessPacket(tigase.server.Packet packet)voidsetName(String name)voidsetStatisticsPrefix(String prefix)voidstart()voidstatisticExecutedIn(long executionTime)voidstop()-
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:
addOutPacketin interfaceModule
-
addOutPacket
public boolean addOutPacket(tigase.server.Packet packet, Integer timeout, PacketWriter.Callback callback)- Specified by:
addOutPacketin interfaceModule
-
everyHour
public void everyHour()
- Specified by:
everyHourin interfacetigase.stats.StatisticHolder
-
everyMinute
public void everyMinute()
- Specified by:
everyMinutein interfacetigase.stats.StatisticHolder
-
everySecond
public void everySecond()
- Specified by:
everySecondin interfacetigase.stats.StatisticHolder
-
getFeatures
public String[] getFeatures()
- Specified by:
getFeaturesin interfaceModule
-
processPacket
public boolean processPacket(tigase.server.Packet packet)
- Specified by:
processPacketin interfaceModule
-
getDiscoInfo
public tigase.xml.Element getDiscoInfo(String node, boolean isAdmin)
- Specified by:
getDiscoInfoin interfaceModule
-
getDiscoItems
public List<tigase.xml.Element> getDiscoItems(String node, tigase.xmpp.jid.JID jid, tigase.xmpp.jid.JID from)
- Specified by:
getDiscoItemsin interfaceModule
-
getStatistics
public void getStatistics(String compName, tigase.stats.StatisticsList list)
- Specified by:
getStatisticsin interfacetigase.stats.StatisticHolder
-
setStatisticsPrefix
public void setStatisticsPrefix(String prefix)
- Specified by:
setStatisticsPrefixin interfacetigase.stats.StatisticHolder
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime)
- Specified by:
statisticExecutedInin interfacetigase.stats.StatisticHolder
-
init
public void init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)
-
initBindings
public void initBindings(Bindings binds)
- Specified by:
initBindingsin interfaceModule
-
isAdmin
public boolean isAdmin(tigase.xmpp.jid.BareJID user)
-
start
public void start()
- Specified by:
startin interfaceModule- Specified by:
startin classAbstractHttpModule
-
stop
public void stop()
- Specified by:
stopin interfaceModule- Specified by:
stopin classAbstractHttpModule
-
executedIn
public void executedIn(String path, long executionTime)
-
initialize
public void initialize()
- Specified by:
initializein interfacetigase.kernel.beans.Initializable- Overrides:
initializein classAbstractHttpModule
-
getComponentName
protected String getComponentName()
-
-