public static boolean containsMultipleRoutingContext ( RESTRequest request ) { //TODO: add a check for query string if ( request instanceof ServletRESTRequestWithParams ) { ServletRESTRequestWithParams req = ( ServletRESTRequestWithParams ) request ; return ( req . getParam ( ClientProvider . COLLECTIVE_HOST_NAMES ) != null || request . getHeader ( ClientProvider . COLLECTIVE_HOST_NAMES ) != null ) ; } return request . getHeader ( ClientProvider . COLLECTIVE_HOST_NAMES ) != null ; }
Quick check for multiple - target routing context without actually fetching all pieces