Class RegexHttpContextActivationFilter

java.lang.Object
org.jboss.weld.servlet.spi.helpers.RegexHttpContextActivationFilter
All Implemented Interfaces:
Service, HttpContextActivationFilter

public class RegexHttpContextActivationFilter extends Object implements HttpContextActivationFilter
A helper implementation of HttpContextActivationFilter that accepts every request that matches a predefined regular expression.
Author:
Jozef Hartinger
  • Constructor Details

    • RegexHttpContextActivationFilter

      public RegexHttpContextActivationFilter(Pattern pattern)
      Constructs an instance using provided Pattern
      Parameters:
      pattern - regex pattern
    • RegexHttpContextActivationFilter

      public RegexHttpContextActivationFilter(String regex)
      Constructs an instance using provided String
      Parameters:
      regex - string representation which will be compiled to Pattern
  • Method Details

    • accepts

      public boolean accepts(jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: HttpContextActivationFilter
      Determines whether CDI contexts should be active during processing of this request
      Specified by:
      accepts in interface HttpContextActivationFilter
      Parameters:
      request - the request
      Returns:
      true if CDI contexts should be active during processing of this request
    • cleanup

      public void cleanup()
      Description copied from interface: Service
      Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
      Specified by:
      cleanup in interface Service