public class DefaultHttpResponse extends DefaultHttpMessage implements HttpResponse
HttpResponse
implementation.Constructor and Description |
---|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
boolean validateHeaders)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
HttpResponseStatus |
getStatus()
Returns the status of this
HttpResponse . |
HttpResponse |
setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpResponse |
setStatus(HttpResponseStatus status)
Set the status of this
HttpResponse . |
java.lang.String |
toString() |
getProtocolVersion, headers
getDecoderResult, setDecoderResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProtocolVersion, headers
getDecoderResult, setDecoderResult
public DefaultHttpResponse(HttpVersion version, HttpResponseStatus status)
version
- the HTTP version of this responsestatus
- the getStatus of this responsepublic DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, boolean validateHeaders)
version
- the HTTP version of this responsestatus
- the getStatus of this responsevalidateHeaders
- validate the headers when adding thempublic HttpResponseStatus getStatus()
HttpResponse
HttpResponse
.getStatus
in interface HttpResponse
HttpResponseStatus
of this HttpResponse
public HttpResponse setStatus(HttpResponseStatus status)
HttpResponse
HttpResponse
.setStatus
in interface HttpResponse
public HttpResponse setProtocolVersion(HttpVersion version)
HttpMessage
HttpMessage
setProtocolVersion
in interface HttpMessage
setProtocolVersion
in interface HttpResponse
setProtocolVersion
in class DefaultHttpMessage
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2008–2018 The Netty Project. All rights reserved.