public List < RouteMatch > findMultiple ( HttpMethod httpMethod , String path , String acceptType ) { List < RouteMatch > matchSet = new ArrayList <> ( ) ; List < RouteEntry > routeEntries = findTargetsForRequestedRoute ( httpMethod , path ) ; for ( RouteEntry routeEntry : routeEntries ) { if ( acceptType != null ) { String bestMatch = MimeParse . bestMatch ( Arrays . asList ( routeEntry . acceptedType ) , acceptType ) ; if ( routeWithGivenAcceptType ( bestMatch ) ) { matchSet . add ( new RouteMatch ( routeEntry . target , routeEntry . path , path , acceptType ) ) ; } } else { matchSet . add ( new RouteMatch ( routeEntry . target , routeEntry . path , path , acceptType ) ) ; } } return matchSet ; }
Finds multiple targets for a requested route .