Package tigase.http.modules.rest
Class RestModule
- java.lang.Object
-
- tigase.http.AbstractHttpModule
-
- tigase.http.modules.AbstractBareModule
-
- tigase.http.modules.AbstractModule
-
- tigase.http.modules.rest.RestModule
-
- All Implemented Interfaces:
Module,tigase.kernel.beans.config.ConfigurationChangedAware,tigase.kernel.beans.Initializable,tigase.kernel.beans.RegistrarBean,tigase.kernel.beans.UnregisterAware,tigase.stats.StatisticHolder
@Bean(name="rest", parent=HttpMessageReceiver.class, active=true) @ConfigType({DefaultMode,SessionManagerMode,ConnectionManagersMode,ComponentMode}) public class RestModule extends AbstractModule
-
-
Field Summary
-
Fields inherited from class tigase.http.modules.AbstractBareModule
commandManager, 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 RestModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeUnregister()voidcountRequest(javax.servlet.http.HttpServletRequest request)voideveryHour()voideveryMinute()voideverySecond()voidexecutedIn(String path, long executionTime)protected ApiKeyRepositorygetApiKeyRepository()StringgetDescription()static File[]getGroovyFiles(File scriptsDirFile)tigase.kernel.core.KernelgetKernel()protected List<? extends RestServletIfc>getRestServlets()voidgetStatistics(String compName, tigase.stats.StatisticsList list)voidinit(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)voidinitialize()booleanisRequestAllowed(String key, String domain, String path)protected voidregisterRestServlet(RestServletIfc servlet)voidsetApiKeyRepository(ApiKeyRepository apiKeyRepository)voidstart()voidstatisticExecutedIn(long executionTime)voidstop()-
Methods inherited from class tigase.http.modules.AbstractModule
getAuthRepository, getModuleByUUID, getUserRepository
-
Methods inherited from class tigase.http.modules.AbstractBareModule
addOutPacket, addOutPacket, getComponentName, getDiscoInfo, getDiscoItems, getFeatures, getJid, getName, initBindings, isAdmin, processPacket, setName, setStatisticsPrefix
-
Methods inherited from class tigase.http.AbstractHttpModule
beanConfigurationChanged, 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
addOutPacket, addOutPacket, getDiscoInfo, getDiscoItems, getFeatures, getJid, getName, initBindings, isAdmin, processPacket
-
-
-
-
Method Detail
-
everyHour
public void everyHour()
- Specified by:
everyHourin interfacetigase.stats.StatisticHolder- Overrides:
everyHourin classAbstractBareModule
-
everyMinute
public void everyMinute()
- Specified by:
everyMinutein interfacetigase.stats.StatisticHolder- Overrides:
everyMinutein classAbstractBareModule
-
everySecond
public void everySecond()
- Specified by:
everySecondin interfacetigase.stats.StatisticHolder- Overrides:
everySecondin classAbstractBareModule
-
getDescription
public String getDescription()
-
setApiKeyRepository
public void setApiKeyRepository(ApiKeyRepository apiKeyRepository)
-
isRequestAllowed
public boolean isRequestAllowed(String key, String domain, String path)
- Specified by:
isRequestAllowedin interfaceModule- Overrides:
isRequestAllowedin classAbstractModule
-
start
public void start()
- Specified by:
startin interfaceModule- Overrides:
startin classAbstractBareModule
-
stop
public void stop()
- Specified by:
stopin interfaceModule- Overrides:
stopin classAbstractBareModule
-
getStatistics
public void getStatistics(String compName, tigase.stats.StatisticsList list)
- Specified by:
getStatisticsin interfacetigase.stats.StatisticHolder- Overrides:
getStatisticsin classAbstractBareModule
-
countRequest
public void countRequest(javax.servlet.http.HttpServletRequest request)
-
executedIn
public void executedIn(String path, long executionTime)
- Overrides:
executedInin classAbstractBareModule
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime)
- Specified by:
statisticExecutedInin interfacetigase.stats.StatisticHolder- Overrides:
statisticExecutedInin classAbstractBareModule
-
getKernel
public tigase.kernel.core.Kernel getKernel()
-
init
public void init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)- Specified by:
initin interfaceModule- Overrides:
initin classAbstractBareModule
-
initialize
public void initialize()
- Specified by:
initializein interfacetigase.kernel.beans.Initializable- Overrides:
initializein classAbstractBareModule
-
beforeUnregister
public void beforeUnregister()
- Specified by:
beforeUnregisterin interfacetigase.kernel.beans.UnregisterAware- Overrides:
beforeUnregisterin classAbstractHttpModule
-
registerRestServlet
protected void registerRestServlet(RestServletIfc servlet)
-
getApiKeyRepository
protected ApiKeyRepository getApiKeyRepository()
-
getRestServlets
protected List<? extends RestServletIfc> getRestServlets()
-
-