public class DefaultRequestMappingsMatcherStrategy extends Object implements RequestMappingsMatcherStrategy, Comparator<RequestMappingInfo>
RequestMappingsMatcherStrategy that uses AntPathMatcher.
Uses the following criteries for route priorities: pattern complexity, patterns count, types count.| Constructor and Description |
|---|
DefaultRequestMappingsMatcherStrategy() |
DefaultRequestMappingsMatcherStrategy(@NotNull org.springframework.util.PathMatcher pathMatcher) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(@NotNull RequestMappingInfo o1,
@NotNull RequestMappingInfo o2) |
@NotNull Map<String,String> |
extractPatternVariables(@NotNull String text,
@NotNull RequestMappingInfo mappingInfo)
Extracts variables from event text according to the matched pattern.
|
boolean |
isMatched(@NotNull TelegramEvent telegramEvent,
@NotNull RequestMappingInfo mappingInfo)
Check if mapping info is matched with Telegram event.
|
@NotNull List<HandlerMethodContainer.RequestMapping> |
postProcess(@NotNull List<HandlerMethodContainer.RequestMapping> mappings)
Will be invoked after all mappings is discovered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic DefaultRequestMappingsMatcherStrategy()
public DefaultRequestMappingsMatcherStrategy(@NotNull
@NotNull org.springframework.util.PathMatcher pathMatcher)
public boolean isMatched(@NotNull
@NotNull TelegramEvent telegramEvent,
@NotNull
@NotNull RequestMappingInfo mappingInfo)
RequestMappingsMatcherStrategyisMatched in interface RequestMappingsMatcherStrategytelegramEvent - event received from Telegram APImappingInfo - mapping info@NotNull public @NotNull List<HandlerMethodContainer.RequestMapping> postProcess(@NotNull @NotNull List<HandlerMethodContainer.RequestMapping> mappings)
RequestMappingsMatcherStrategypostProcess in interface RequestMappingsMatcherStrategymappings - all discovered mappings@NotNull public @NotNull Map<String,String> extractPatternVariables(@NotNull @NotNull String text, @NotNull @NotNull RequestMappingInfo mappingInfo)
RequestMappingsMatcherStrategyextractPatternVariables in interface RequestMappingsMatcherStrategytext - Telegram event textmappingInfo - matched handler method metainfopublic int compare(@NotNull
@NotNull RequestMappingInfo o1,
@NotNull
@NotNull RequestMappingInfo o2)
compare in interface Comparator<RequestMappingInfo>Copyright © 2022. All rights reserved.