public class HttpServerResponseImpl extends HttpResponseImpl implements HttpServerResponse
HttpResponse
interface.HeaderFieldsAccessor.HeaderFieldsBuilder<T extends HeaderFields<?,?>,B extends HeaderFieldsAccessor.HeaderFieldsBuilder<T,B>>, HeaderFieldsAccessor.HeaderFieldsMutator<T extends HeaderFields<?,?>>, HeaderFieldsAccessor.HeaderFieldsProperty<T extends HeaderFields<?,?>>
HttpStatusCodeAccessor.HttpStatusCodeBuilder<B extends HttpStatusCodeAccessor.HttpStatusCodeBuilder<B>>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
Modifier and Type | Field and Description |
---|---|
protected MediaTypeFactoryLookup |
_mediaTypeFactoryLookup |
_httpStatusCode
Constructor and Description |
---|
HttpServerResponseImpl(HttpStatusCode aHttpStatusCode,
MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Instantiates a new http server response impl.
|
HttpServerResponseImpl(MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Instantiates a new http server response impl.
|
HttpServerResponseImpl(ResponseHeaderFields aResponseHeaderFields,
MediaTypeFactoryLookup aMediaTypeFactoryLookup)
Instantiates a new http server response impl.
|
Modifier and Type | Method and Description |
---|---|
<RES> RES |
getResponse()
Gets the response.
|
void |
setHttpStatusCode(HttpStatusCode aStatusCode)
Sets the HTTP Status-Code for the HTTP Status-Code property.
|
<RES> void |
setResponse(RES aResponse)
Sets the response for the response property.
|
String |
toHttpBody()
Converts an object representing the HTTP body to a
String
instance. |
getHeaderFields, getHttpStatusCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withHttpStatusCode, withResponse
getHeaderFields
getHttpStatusCode
protected MediaTypeFactoryLookup _mediaTypeFactoryLookup
public HttpServerResponseImpl(MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aMediaTypeFactoryLookup
- the a media type factory lookuppublic HttpServerResponseImpl(HttpStatusCode aHttpStatusCode, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aHttpStatusCode
- the a http status codeaMediaTypeFactoryLookup
- the a media type factory lookuppublic HttpServerResponseImpl(ResponseHeaderFields aResponseHeaderFields, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
aResponseHeaderFields
- the a response Header-FieldsaMediaTypeFactoryLookup
- the a media type factory lookuppublic <RES> RES getResponse()
getResponse
in interface HttpServerResponse
RES
- the generic typepublic <RES> void setResponse(RES aResponse)
setResponse(Object)
supports the
HttpBodyMap
to marshal an HttpBodyMap
into an HTTP
Request-Body.setResponse
in interface HttpServerResponse
RES
- the generic typeaResponse
- The response to be stored by the response property.public void setHttpStatusCode(HttpStatusCode aStatusCode)
setHttpStatusCode
in interface HttpStatusCodeAccessor.HttpStatusCodeMutator
aStatusCode
- The HTTP Status-Code to be stored by the HTTP HTTP
Status-Code property.public String toHttpBody() throws BadResponseException
String
instance. Automatically determines the ContentType
from any
headers when applicable.toHttpBody
in interface HttpBodyAccessor.HttpBodyProvider<BadResponseException>
String
instance represented by the
according object.BadResponseException
Copyright © 2018. All rights reserved.