Class FilterChainManager.TargetCacheKey
java.lang.Object
com.amazonaws.serverless.proxy.internal.servlet.FilterChainManager.TargetCacheKey
- Enclosing class:
- FilterChainManager<ServletContextType extends jakarta.servlet.ServletContext>
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()The hash code for a cache key is calculated using the target path and dispatcher type.voidsetServletName(String servletName)
-
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 -
equals
-
setServletName
-