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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
     
    int
     
    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

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EventsCounterImpl

      public EventsCounterImpl()
  • Method Details

    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • getEventsCount

      public int getEventsCount(String topic)
      Specified by:
      getEventsCount in interface EventsCounter
    • doGet

      protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
      Throws:
      javax.servlet.ServletException
      IOException