Class ReqContextFilter

java.lang.Object
org.apache.storm.daemon.drpc.webapp.ReqContextFilter
All Implemented Interfaces:
javax.servlet.Filter

@Provider @PreMatching public class ReqContextFilter extends Object implements javax.servlet.Filter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
    A filter which populates the request if it is null and then passes it on to the next entity in the chain.
    void
    handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain)
    A method used by doFilter which populates the request if it is null and then passes it on to the next entity in the chain.
    void
    init(javax.servlet.FilterConfig config)
     
    void
    populateContext(javax.servlet.http.HttpServletRequest request)
    Populate the Storm RequestContext from an servlet request.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • populateContext

      public void populateContext(javax.servlet.http.HttpServletRequest request)
      Populate the Storm RequestContext from an servlet request. This should be called in each handler
      Parameters:
      request - the request to populate
    • init

      public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      A filter which populates the request if it is null and then passes it on to the next entity in the chain.
      Specified by:
      doFilter in interface javax.servlet.Filter
      Parameters:
      request - the request to populate
      response - the response to populate
      chain - the next chain of entities to pass the object to
      Throws:
      IOException
      javax.servlet.ServletException
    • handle

      public void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      A method used by doFilter which populates the request if it is null and then passes it on to the next entity in the chain.
      Parameters:
      request - the request to populate
      response - the response to populate
      chain - the next chain of entities to pass the object to
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter