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 void
beforeUnregister()
void
countRequest(javax.servlet.http.HttpServletRequest request)
void
everyHour()
void
everyMinute()
void
everySecond()
void
executedIn(String path, long executionTime)
protected ApiKeyRepository
getApiKeyRepository()
String
getDescription()
static File[]
getGroovyFiles(File scriptsDirFile)
tigase.kernel.core.Kernel
getKernel()
protected List<? extends RestServletIfc>
getRestServlets()
void
getStatistics(String compName, tigase.stats.StatisticsList list)
void
init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)
void
initialize()
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
-
-
-
-
Method Detail
-
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
public String getDescription()
-
setApiKeyRepository
public void setApiKeyRepository(ApiKeyRepository apiKeyRepository)
-
isRequestAllowed
public boolean isRequestAllowed(String key, String domain, String path)
- 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
public void getStatistics(String compName, tigase.stats.StatisticsList list)
- Specified by:
getStatistics
in interfacetigase.stats.StatisticHolder
- Overrides:
getStatistics
in classAbstractBareModule
-
countRequest
public void countRequest(javax.servlet.http.HttpServletRequest request)
-
executedIn
public void executedIn(String path, long executionTime)
- 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
public void init(tigase.xmpp.jid.JID jid, String componentName, PacketWriter writer)
- 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
protected void registerRestServlet(RestServletIfc servlet)
-
getApiKeyRepository
protected ApiKeyRepository getApiKeyRepository()
-
getRestServlets
protected List<? extends RestServletIfc> getRestServlets()
-
-