Class EventsCounterImpl
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.api.servlets.SlingSafeMethodsServlet
-
- org.apache.sling.launchpad.testservices.events.EventsCounterImpl
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,EventsCounter
,org.osgi.service.event.EventHandler
public class EventsCounterImpl extends org.apache.sling.api.servlets.SlingSafeMethodsServlet implements org.osgi.service.event.EventHandler, EventsCounter
Count the number of OSGi events that we receive on specific topics, and report them to clients.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EventsCounterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
int
getEventsCount(String topic)
void
handleEvent(org.osgi.service.event.Event event)
-
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
-
-
-
-
Method Detail
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
getEventsCount
public int getEventsCount(String topic)
- Specified by:
getEventsCount
in interfaceEventsCounter
-
doGet
protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classorg.apache.sling.api.servlets.SlingSafeMethodsServlet
- Throws:
javax.servlet.ServletException
IOException
-
-