Package org.refcodes.net
Interface HttpServerResponse
-
- All Superinterfaces:
org.refcodes.mixin.Dumpable,HeaderFieldsAccessor<ResponseHeaderFields>,HttpBodyAccessor.HttpBodyProvider<BadResponseException>,HttpResponse,HttpStatusCodeAccessor,HttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>,HttpStatusCodeAccessor.HttpStatusCodeMutator,HttpStatusCodeAccessor.HttpStatusCodeProperty
- All Known Implementing Classes:
HttpServerResponseImpl
public interface HttpServerResponse extends HttpResponse, HttpStatusCodeAccessor.HttpStatusCodeProperty, HttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>, HttpBodyAccessor.HttpBodyProvider<BadResponseException>, org.refcodes.mixin.Dumpable
Defines aHttpServerResponseas produced 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.HttpStatusCodeAccessor
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <RES> RESgetResponse()Retrieves the response from the response property.<RES> voidsetResponse(RES aResponse)Sets the response for the response property.default HttpServerResponsewithHttpStatusCode(HttpStatusCode aStatusCode)Sets the HTTP Status-Code for the HTTP Status-Code property.default <RES> HttpServerResponsewithResponse(RES aResponse)Sets the response for the response property.-
Methods inherited from interface org.refcodes.net.HeaderFieldsAccessor
getHeaderFields
-
Methods inherited from interface org.refcodes.net.HttpBodyAccessor.HttpBodyProvider
toHttpBody
-
Methods inherited from interface org.refcodes.net.HttpStatusCodeAccessor
getHttpStatusCode
-
Methods inherited from interface org.refcodes.net.HttpStatusCodeAccessor.HttpStatusCodeMutator
setHttpStatusCode
-
-
-
-
Method Detail
-
withHttpStatusCode
default HttpServerResponse withHttpStatusCode(HttpStatusCode aStatusCode)
Sets the HTTP Status-Code for the HTTP Status-Code property.- Specified by:
withHttpStatusCodein interfaceHttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>- Parameters:
aStatusCode- The HTTP Status-Code to be stored by the HTTP HTTP Status-Code property.- Returns:
- The builder for applying multiple build operations.
-
getResponse
<RES> RES getResponse()
Retrieves the response from the response property.- Type Parameters:
RES- the generic type- Returns:
- The response stored by the response property.
-
setResponse
<RES> void setResponse(RES aResponse)
Sets the response for the response property. TheHttpServerResponseImpl.setResponse(Object)supports theHttpBodyMapto marshal anHttpBodyMapinto an HTTP Request-Body.- Type Parameters:
RES- the generic type- Parameters:
aResponse- The response to be stored by the response property.
-
withResponse
default <RES> HttpServerResponse withResponse(RES aResponse)
Sets the response for the response property.- Type Parameters:
RES- the generic type- Parameters:
aResponse- The response to be stored by the response property.- Returns:
- The builder for applying multiple build operations.
-
-