Class FilterChainManager.TargetCacheKey

java.lang.Object
com.amazonaws.serverless.proxy.internal.servlet.FilterChainManager.TargetCacheKey
Enclosing class:
FilterChainManager<ServletContextType extends jakarta.servlet.ServletContext>

protected static class FilterChainManager.TargetCacheKey extends Object
Object used as a key for the filter chain cache. It contains a target path and dispatcher type property. It overrides the default hashCode and equals methods to return a consistent hash for comparison.
  • Constructor Details

    • TargetCacheKey

      protected TargetCacheKey()
  • Method Details

    • hashCode

      public int hashCode()
      The hash code for a cache key is calculated using the target path and dispatcher type. First, the target path is cleaned following these rules: 1. trim white spaces 2. Add "/" as first character if not there 3. Remove "/" as last character if it is there Once the path is cleaned, a string in the form of TARGET_PATH:DISPATCHER_TYPE is generated and used for the hash code
      Overrides:
      hashCode in class Object
      Returns:
      An int representing the hash code fo the generated string
    • equals

      public boolean equals(Object key)
      Overrides:
      equals in class Object
    • setServletName

      public void setServletName(String servletName)