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) |
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.
|
boolean |
isKeepAlive() |
String |
toString() |
public DefaultHttpResponse(HttpVersion version, HttpStatus status, Map<String,String> headers)
public HttpVersion getProtocolVersion()
HttpMessagegetProtocolVersion in interface HttpMessagepublic String getContentType()
HttpMessagegetContentType in interface HttpMessagepublic boolean isKeepAlive()
isKeepAlive in interface HttpMessagepublic String getHeader(String name)
HttpMessagegetHeader in interface HttpMessagename - The name of the desired headerpublic boolean containsHeader(String name)
containsHeader in interface HttpMessagename - the Header's name we are looking forpublic Map<String,String> getHeaders()
getHeaders in interface HttpMessageMap of HTTP headers whose key is a String and whose value is a String
s.public HttpStatus getStatus()
HttpResponsegetStatus in interface HttpResponseCopyright © 2004–2016 Apache MINA Project. All rights reserved.