Package org.refcodes.net
Interface HttpServerRequest
-
- All Superinterfaces:
HeaderFieldsAccessor<RequestHeaderFields>
,HttpBodyAccessor
,HttpInputStreamAccessor
,HttpMethodAccessor
,HttpRequest
,UrlAccessor
- All Known Implementing Classes:
HttpServerRequestImpl
public interface HttpServerRequest extends HttpRequest, HttpBodyAccessor, HttpInputStreamAccessor
Defines aHttpServerRequest
being the request as consumed by the server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.HeaderFieldsAccessor
HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpBodyAccessor
HttpBodyAccessor.HttpBodyBuilder<B extends HttpBodyAccessor.HttpBodyBuilder<B>>, HttpBodyAccessor.HttpBodyMutator, HttpBodyAccessor.HttpBodyProperty, HttpBodyAccessor.HttpBodyProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpInputStreamAccessor
HttpInputStreamAccessor.HttpInputStreamBuilder<B extends HttpInputStreamAccessor.HttpInputStreamBuilder<B>>, HttpInputStreamAccessor.HttpInputStreamMutator, HttpInputStreamAccessor.HttpInputStreamProperty, HttpInputStreamAccessor.HttpInputStreamProvider<EXC extends java.lang.Exception>
-
Nested classes/interfaces inherited from interface org.refcodes.net.HttpMethodAccessor
HttpMethodAccessor.HttpMethodBuilder<B extends HttpMethodAccessor.HttpMethodBuilder<B>>, HttpMethodAccessor.HttpMethodMutator, HttpMethodAccessor.HttpMethodProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.UrlAccessor
UrlAccessor.UrlBuilder, UrlAccessor.UrlMutator, UrlAccessor.UrlProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HttpBodyMap
getRequest()
Retrieves theHttpBodyMap
representing the request body.<REQ> REQ
getRequest(java.lang.Class<REQ> aRequestType)
Retrieves the object representing the request body.-
Methods inherited from interface org.refcodes.net.HeaderFieldsAccessor
getHeaderFields
-
Methods inherited from interface org.refcodes.net.HttpBodyAccessor
getHttpBody
-
Methods inherited from interface org.refcodes.net.HttpInputStreamAccessor
getHttpInputStream
-
Methods inherited from interface org.refcodes.net.HttpMethodAccessor
getHttpMethod
-
Methods inherited from interface org.refcodes.net.UrlAccessor
getUrl
-
-
-
-
Method Detail
-
getRequest
<REQ> REQ getRequest(java.lang.Class<REQ> aRequestType) throws BadRequestException
Retrieves the object representing the request body. TheHttpServerRequestImpl.getRequest(Class)
supports theHttpBodyMap
to unmarshal an HTTP Request-Body into anHttpBodyMap
when providing theHttpBodyMap
as request type.- Type Parameters:
REQ
- the generic type- Parameters:
aRequestType
- The type of which the request is expected to be.- Returns:
- An instance of the type representing the request.
- Throws:
BadRequestException
- thrown when unmarshaling / deserializing an object fails.
-
getRequest
default HttpBodyMap getRequest() throws BadRequestException
Retrieves theHttpBodyMap
representing the request body.- Returns:
- An instance of the
HttpBodyMap
representing the request. - Throws:
BadRequestException
- thrown when unmarshaling / deserializing an object fails.
-
-