use of org.springframework.util.RouteMatcher in project spring-framework by spring-projects.
the class MessageMappingMessageHandler method obtainRouteMatcher.
/**
* Obtain the {@code RouteMatcher} for actual use.
* @return the RouteMatcher (never {@code null})
* @throws IllegalStateException in case of no RouteMatcher set
* @since 5.0
*/
protected RouteMatcher obtainRouteMatcher() {
RouteMatcher routeMatcher = getRouteMatcher();
Assert.state(routeMatcher != null, "No RouteMatcher set");
return routeMatcher;
}
use of org.springframework.util.RouteMatcher in project spring-framework by spring-projects.
the class RSocketMessageHandlerTests method testHandleNoMatch.
private static void testHandleNoMatch(FrameType frameType) {
RSocketMessageHandler handler = new RSocketMessageHandler();
handler.setDecoders(Collections.singletonList(StringDecoder.allMimeTypes()));
handler.setEncoders(Collections.singletonList(CharSequenceEncoder.allMimeTypes()));
handler.afterPropertiesSet();
RouteMatcher matcher = new SimpleRouteMatcher(new AntPathMatcher("."));
RouteMatcher.Route route = matcher.parseRoute("path");
MessageHeaderAccessor headers = new MessageHeaderAccessor();
headers.setHeader(RSocketFrameTypeMessageCondition.FRAME_TYPE_HEADER, frameType);
Message<Object> message = MessageBuilder.createMessage("", headers.getMessageHeaders());
handler.handleNoMatch(route, message);
}
Aggregations