protected boolean processQueryParameters ( Trace trace , Node node ) { boolean ret = false ; // Translate query string into a map Set < Property > queryString = node . getProperties ( Constants . PROP_HTTP_QUERY ) ; if ( ! queryString . isEmpty ( ) ) { StringTokenizer st = new StringTokenizer ( queryString . iterator ( ) . next ( ) . getValue ( ) , "&" ) ; while ( st . hasMoreTokens ( ) ) { String token = st . nextToken ( ) ; String [ ] namevalue = token . split ( "=" ) ; if ( namevalue . length == 2 ) { if ( queryParameters . contains ( namevalue [ 0 ] ) ) { try { node . getProperties ( ) . add ( new Property ( namevalue [ 0 ] , URLDecoder . decode ( namevalue [ 1 ] , "UTF-8" ) ) ) ; ret = true ; } catch ( UnsupportedEncodingException e ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Failed to decode value '" + namevalue [ 1 ] + "': " + e ) ; } } } else if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Ignoring query parameter '" + namevalue [ 0 ] + "'" ) ; } } else if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Query string part does not include name/value pair: " + token ) ; } } } return ret ; }
This method processes the query parameters associated with the supplied node to extract templated named values as properties on the trace node .