public class HttpRequestTokeniserImpl extends Object implements HttpRequestTokeniser
HttpRequestTokeniser
implementation.Constructor and Description |
---|
HttpRequestTokeniserImpl() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
extractParameters(HttpRequest request)
Convenience method for extracting the parameters from the
HttpRequest . |
void |
tokeniseHttpRequest(HttpRequest request,
HttpRequestTokenHandler handler)
Tokenises the
HttpRequest for the path, parameters and fragment
providing them to the HttpRequestTokenHandler to handle. |
void |
tokeniseRequestURI(String requestURI,
HttpRequestTokenHandler handler)
Tokenises the request URI for the path, parameters and fragment.
|
public static Map<String,String> extractParameters(HttpRequest request) throws IOException, HttpRequestTokeniseException
Convenience method for extracting the parameters from the
HttpRequest
.
Only the first value for the parameter will be returned.
request
- HttpRequest
.IOException
- If fails to read data from HttpRequest
.HttpRequestTokeniseException
- If fails to extract the parameters.public void tokeniseHttpRequest(HttpRequest request, HttpRequestTokenHandler handler) throws IOException, HttpRequestTokeniseException
HttpRequestTokeniser
Tokenises the HttpRequest
for the path, parameters and fragment
providing them to the HttpRequestTokenHandler
to handle.
This encompasses the whole HttpRequest
(e.g. on POST
will also tokenise the body for parameters).
tokeniseHttpRequest
in interface HttpRequestTokeniser
request
- HttpRequest
to be tokenised.handler
- HttpRequestTokenHandler
to handle the
HttpRequest
tokens.IOException
- If fails to read data from HttpRequest
.HttpRequestTokeniseException
- If fails to tokenise the HttpRequest
.public void tokeniseRequestURI(String requestURI, HttpRequestTokenHandler handler) throws HttpRequestTokeniseException
HttpRequestTokeniser
tokeniseRequestURI
in interface HttpRequestTokeniser
requestURI
- Request URI to be tokenised.handler
- HttpRequestTokenHandler
to handle the request URI
tokens.HttpRequestTokeniseException
- If fails to tokenise the request URI.Copyright © 2005–2016. All rights reserved.