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) |
HttpServerResponseImpl(MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
HttpServerResponseImpl(ResponseHeaderFields aResponseHeaderFields,
MediaTypeFactoryLookup aMediaTypeFactoryLookup) |
Modifier and Type | Method and Description |
---|---|
<RES> RES |
getResponse()
Retrieves the response from the response property.
|
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()
Returns the
String instance representing the HTTP body from
the implementing 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)
public HttpServerResponseImpl(HttpStatusCode aHttpStatusCode, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
public HttpServerResponseImpl(ResponseHeaderFields aResponseHeaderFields, MediaTypeFactoryLookup aMediaTypeFactoryLookup)
public <RES> RES getResponse()
HttpServerResponse
getResponse
in interface HttpServerResponse
public <RES> void setResponse(RES aResponse)
HttpServerResponse
setResponse
in interface HttpServerResponse
aResponse
- The response to be stored by the response property.public void setHttpStatusCode(HttpStatusCode aStatusCode)
HttpStatusCodeAccessor.HttpStatusCodeMutator
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
HttpBodyAccessor.HttpBodyProvider
String
instance representing the HTTP body from
the implementing instance.
Automatically sets the ContentType
to any headers if
accessible and applicable.toHttpBody
in interface HttpBodyAccessor.HttpBodyProvider<BadResponseException>
String
instance represented by the
implementing instance.BadResponseException
Copyright © 2016. All rights reserved.