public class ProtocolUtil extends Object
Constructor and Description |
---|
ProtocolUtil() |
Modifier and Type | Method and Description |
---|---|
static <FF extends FileFormat,S> |
getAcceptableService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
FileFormatServiceRegistry<FF,S> serviceRegistry) |
static void |
logAcceptableFormats(javax.servlet.http.HttpServletRequest request) |
static void |
logRequestParameters(javax.servlet.http.HttpServletRequest request)
Logs all request parameters of the supplied request.
|
static boolean |
parseBooleanParam(javax.servlet.http.HttpServletRequest request,
String paramName,
boolean defaultValue) |
static Resource[] |
parseContextParam(javax.servlet.http.HttpServletRequest request,
String paramName,
ValueFactory vf) |
static IRI |
parseGraphParam(javax.servlet.http.HttpServletRequest request,
ValueFactory vf) |
static long |
parseLongParam(javax.servlet.http.HttpServletRequest request,
String paramName,
long defaultValue) |
static Resource |
parseResourceParam(javax.servlet.http.HttpServletRequest request,
String paramName,
ValueFactory vf) |
static int |
parseTimeoutParam(javax.servlet.http.HttpServletRequest request)
Reads the
Protocol.TIMEOUT_PARAM_NAME parameter from the request and (if present) parses it into an
integer value. |
static IRI |
parseURIParam(javax.servlet.http.HttpServletRequest request,
String paramName,
ValueFactory vf) |
static Value |
parseValueParam(javax.servlet.http.HttpServletRequest request,
String paramName,
ValueFactory vf) |
public static Value parseValueParam(javax.servlet.http.HttpServletRequest request, String paramName, ValueFactory vf) throws ClientHTTPException
ClientHTTPException
public static Resource parseResourceParam(javax.servlet.http.HttpServletRequest request, String paramName, ValueFactory vf) throws ClientHTTPException
ClientHTTPException
public static IRI parseURIParam(javax.servlet.http.HttpServletRequest request, String paramName, ValueFactory vf) throws ClientHTTPException
ClientHTTPException
public static IRI parseGraphParam(javax.servlet.http.HttpServletRequest request, ValueFactory vf) throws ClientHTTPException
ClientHTTPException
public static Resource[] parseContextParam(javax.servlet.http.HttpServletRequest request, String paramName, ValueFactory vf) throws ClientHTTPException
ClientHTTPException
public static boolean parseBooleanParam(javax.servlet.http.HttpServletRequest request, String paramName, boolean defaultValue)
public static long parseLongParam(javax.servlet.http.HttpServletRequest request, String paramName, long defaultValue) throws ClientHTTPException
ClientHTTPException
public static void logRequestParameters(javax.servlet.http.HttpServletRequest request)
public static <FF extends FileFormat,S> S getAcceptableService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, FileFormatServiceRegistry<FF,S> serviceRegistry) throws ClientHTTPException
ClientHTTPException
public static int parseTimeoutParam(javax.servlet.http.HttpServletRequest request) throws ClientHTTPException
Protocol.TIMEOUT_PARAM_NAME
parameter from the request and (if present) parses it into an
integer value.request
- the HttpServletRequest
to read the parameter fromClientHTTPException
- if the value of the timeout parameter is not a valid integer.public static void logAcceptableFormats(javax.servlet.http.HttpServletRequest request)
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.