Class SoundCaptchaFilter

  • All Implemented Interfaces:
    javax.servlet.Filter

    public class SoundCaptchaFilter
    extends java.lang.Object
    implements javax.servlet.Filter
    Generation captcha class This class invok captcha service from applicationContext and get a challenge. The challenge response temp stored in service map, with user session id key.
    this servlet throw generated sound, wav formatted.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      Destroy the filter
      void doFilter​(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain filterChain)
      Apply the filter
      void init​(javax.servlet.FilterConfig config)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SoundCaptchaFilter

        public SoundCaptchaFilter()
    • Method Detail

      • 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 req,
                             javax.servlet.ServletResponse res,
                             javax.servlet.FilterChain filterChain)
                      throws java.io.IOException,
                             javax.servlet.ServletException
        Apply the filter
        Specified by:
        doFilter in interface javax.servlet.Filter
        Parameters:
        req - The HTTP request
        res - The HTTP response
        filterChain - The Filter Chain
        Throws:
        java.io.IOException - If an error occured
        javax.servlet.ServletException - If an error occured
      • destroy

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