Class DispatcherRichletFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class DispatcherRichletFilter
    extends RichletFilter
    Dispatches Http requests to StatelessRichlet mapping handlers
    Author:
    jumperchen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)  
      protected Desktop getDesktop​(Session sess, java.lang.String dtid)  
      void init​(javax.servlet.FilterConfig config)  
      boolean isCloudMode()
      Returns whether the mode in cloud.
      java.lang.reflect.Method lookup​(java.lang.String path)
      Lookups a richlet mapping with the given path
      protected boolean process​(Session sess, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path, boolean bRichlet)  
      protected boolean processUpdate​(Session sess, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path, boolean bRichlet)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BASE_PACKAGES

        public static final java.lang.String BASE_PACKAGES
        The base packages of Richlet initial config for scanning RichletMapping annotation.
        See Also:
        Constant Field Values
      • CLOUD_MODE

        public static final java.lang.String CLOUD_MODE
        The cloud mode flag of Richlet initial config for destroying desktop per request.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DispatcherRichletFilter

        public DispatcherRichletFilter()
    • Method Detail

      • lookup

        public java.lang.reflect.Method lookup​(java.lang.String path)
        Lookups a richlet mapping with the given path
        Parameters:
        path - a request path.
      • isCloudMode

        public boolean isCloudMode()
        Returns whether the mode in cloud.
        Returns:
        true as default
      • init

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

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws java.io.IOException,
                             javax.servlet.ServletException
        Specified by:
        doFilter in interface javax.servlet.Filter
        Overrides:
        doFilter in class RichletFilter
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • process

        protected boolean process​(Session sess,
                                  javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response,
                                  java.lang.String path,
                                  boolean bRichlet)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
        Overrides:
        process in class RichletFilter
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • processUpdate

        protected boolean processUpdate​(Session sess,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        java.lang.String path,
                                        boolean bRichlet)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • getDesktop

        protected Desktop getDesktop​(Session sess,
                                     java.lang.String dtid)