Class SlackEventsApiServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.slack.api.app_backend.events.servlet.SlackEventsApiServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class SlackEventsApiServlet
extends javax.servlet.http.HttpServlet
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    SlackEventsApiServlet()  
  • Method Summary

    Modifier and Type Method Description
    void destroy()  
    protected void doPost​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
    protected String doReadRequestBodyAsString​(javax.servlet.http.HttpServletRequest req)
    Reads the request body and returns the value as a string.
    protected String getSlackSigningSecret()
    Returns the signing secret supposed to be used for verifying requests from Slack.
    void init()  
    protected boolean isSignatureVerifierEnabled()
    If you'd like to do the same in a servlet filter, return false instead.
    protected abstract void setupDispatcher​(EventsDispatcher dispatcher)  

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.servlet.GenericServlet

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

    Methods inherited from class java.lang.Object

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

  • Method Details

    • setupDispatcher

      protected abstract void setupDispatcher​(EventsDispatcher dispatcher)
    • init

      public void init() throws javax.servlet.ServletException
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Servlet
      Overrides:
      destroy in class javax.servlet.GenericServlet
    • doPost

      protected void doPost​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      Overrides:
      doPost in class javax.servlet.http.HttpServlet
      Throws:
      IOException
    • getSlackSigningSecret

      protected String getSlackSigningSecret()
      Returns the signing secret supposed to be used for verifying requests from Slack.
    • isSignatureVerifierEnabled

      protected boolean isSignatureVerifierEnabled()
      If you'd like to do the same in a servlet filter, return false instead.
    • doReadRequestBodyAsString

      protected String doReadRequestBodyAsString​(javax.servlet.http.HttpServletRequest req) throws IOException
      Reads the request body and returns the value as a string.
      Throws:
      IOException