类 AbstractHandlerMethodMapping.MappingRegistry
java.lang.Object
cn.taketoday.util.MapCache<Method,HandlerInterceptor[],HandlerMethod>
cn.taketoday.web.handler.method.AbstractHandlerMethodMapping.MappingRegistry
final class AbstractHandlerMethodMapping.MappingRegistry
extends cn.taketoday.util.MapCache<Method,HandlerInterceptor[],HandlerMethod>
A registry that maintains all mappings to handler methods, exposing methods
to perform lookups and providing concurrent access.
Package-private for testing purposes.
-
字段概要
字段修饰符和类型字段说明private final ConcurrentHashMap<HandlerMethod,CorsConfiguration> private final ConcurrentHashMap<String,List<HandlerMethod>> private final ReentrantReadWriteLock -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidAcquire the read lock when using getMappings and getMappingsByUrl.private voidaddMappingName(String name, HandlerMethod handlerMethod) protected HandlerInterceptor[]createValue(Method method, HandlerMethod handlerMethod) private Class<?>getControllerClass(Method method, HandlerMethod handlerMethod) getCorsConfiguration(HandlerMethod handlerMethod) Return CORS configuration.getHandlerInterceptors(HandlerMethod handlerMethod) getHandlerMethodsByMappingName(String mappingName) Return handler methods by mapping name.getMappingsByDirectPath(String urlPath) Return matches for the given URL path.voidvoidRelease the read lock after using getMappings and getMappingsByUrl.private voidvoidunregister(T mapping) private voidvalidateMethodMapping(HandlerMethod handlerMethod, T mapping) 从类继承的方法 cn.taketoday.util.MapCache
clear, get, get, get, put, remove
-
字段详细资料
-
registrations
-
readWriteLock
-
pathLookup
-
nameLookup
-
corsLookup
-
-
构造器详细资料
-
MappingRegistry
MappingRegistry()
-
-
方法详细资料
-
getMappingsByDirectPath
Return matches for the given URL path. Not thread-safe.- 另请参阅:
-
getHandlerMethodsByMappingName
Return handler methods by mapping name. Thread-safe for concurrent use. -
getCorsConfiguration
Return CORS configuration. Thread-safe for concurrent use. -
acquireReadLock
public void acquireReadLock()Acquire the read lock when using getMappings and getMappingsByUrl. -
releaseReadLock
public void releaseReadLock()Release the read lock after using getMappings and getMappingsByUrl. -
register
-
validateMethodMapping
-
addMappingName
-
unregister
-
removeMappingName
-
createValue
- 覆盖:
createValue在类中cn.taketoday.util.MapCache<Method,HandlerInterceptor[], HandlerMethod>
-
getControllerClass
-
getHandlerInterceptors
-