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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
countRequest
(javax.servlet.http.HttpServletRequest request) void
void
void
void
executedIn
(String path, long executionTime) protected ApiKeyRepository
static File[]
getGroovyFiles
(File scriptsDirFile) tigase.kernel.core.Kernel
protected List<? extends RestServletIfc>
void
getStatistics
(String compName, tigase.stats.StatisticsList list) void
init
(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer) void
boolean
isRequestAllowed
(String key, String domain, String path) protected void
registerRestServlet
(RestServletIfc servlet) void
setApiKeyRepository
(ApiKeyRepository apiKeyRepository) void
start()
void
statisticExecutedIn
(long executionTime) void
stop()
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
Methods inherited from interface tigase.stats.StatisticHolder
setStatisticsPrefix
-
Constructor Details
-
RestModule
public RestModule()
-
-
Method Details
-
getGroovyFiles
-
everyHour
public void everyHour()- Specified by:
everyHour
in interfacetigase.stats.StatisticHolder
- Overrides:
everyHour
in classAbstractBareModule
-
everyMinute
public void everyMinute()- Specified by:
everyMinute
in interfacetigase.stats.StatisticHolder
- Overrides:
everyMinute
in classAbstractBareModule
-
everySecond
public void everySecond()- Specified by:
everySecond
in interfacetigase.stats.StatisticHolder
- Overrides:
everySecond
in classAbstractBareModule
-
getDescription
-
setApiKeyRepository
-
isRequestAllowed
- Specified by:
isRequestAllowed
in interfaceModule
- Overrides:
isRequestAllowed
in classAbstractModule
-
start
public void start()- Specified by:
start
in interfaceModule
- Overrides:
start
in classAbstractBareModule
-
stop
public void stop()- Specified by:
stop
in interfaceModule
- Overrides:
stop
in classAbstractBareModule
-
getStatistics
- Specified by:
getStatistics
in interfacetigase.stats.StatisticHolder
- Overrides:
getStatistics
in classAbstractBareModule
-
countRequest
public void countRequest(javax.servlet.http.HttpServletRequest request) -
executedIn
- Overrides:
executedIn
in classAbstractBareModule
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime) - Specified by:
statisticExecutedIn
in interfacetigase.stats.StatisticHolder
- Overrides:
statisticExecutedIn
in classAbstractBareModule
-
getKernel
public tigase.kernel.core.Kernel getKernel() -
init
- Specified by:
init
in interfaceModule
- Overrides:
init
in classAbstractBareModule
-
initialize
public void initialize()- Specified by:
initialize
in interfacetigase.kernel.beans.Initializable
- Overrides:
initialize
in classAbstractBareModule
-
beforeUnregister
public void beforeUnregister()- Specified by:
beforeUnregister
in interfacetigase.kernel.beans.UnregisterAware
- Overrides:
beforeUnregister
in classAbstractHttpModule
-
registerRestServlet
-
getApiKeyRepository
-
getRestServlets
-