public class DefaultHttpResponse extends Object implements HttpResponse
| Constructor and Description |
|---|
DefaultHttpResponse(HttpVersion version,
HttpStatus status,
Map<String,String> headers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsHeader(String name)
Returns true if the HTTP header with the specified name exists in this request.
|
ByteBuffer |
encode(HttpPduEncodingVisitor visitor) |
String |
getContentType()
Gets the Content-Type header of the message.
|
String |
getHeader(String name)
Returns the value of the HTTP header with the specified name.
|
Map<String,String> |
getHeaders()
|
HttpVersion |
getProtocolVersion()
The HTTP version of the message
|
HttpStatus |
getStatus()
The HTTP status code for the HTTP response (e.g. 200 for OK, 404 for not found, etc..)
|
boolean |
isKeepAlive()
Returns true if this message enables keep-alive connection.
|
String |
toString() |
public DefaultHttpResponse(HttpVersion version, HttpStatus status, Map<String,String> headers)
public HttpVersion getProtocolVersion()
getProtocolVersion in interface HttpMessagepublic String getContentType()
getContentType in interface HttpMessagepublic boolean isKeepAlive()
isKeepAlive in interface HttpMessagepublic String getHeader(String name)
getHeader in interface HttpMessagename - The name of the desired headerpublic boolean containsHeader(String name)
containsHeader in interface HttpMessagepublic Map<String,String> getHeaders()
getHeaders in interface HttpMessagepublic HttpStatus getStatus()
getStatus in interface HttpResponsepublic ByteBuffer encode(HttpPduEncodingVisitor visitor)
Copyright © 2009–2013 Apache MINA Project. All rights reserved.