public class HttpResponse extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_TARGET_HOST |
Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
String value) |
Object |
getAttribute(String key)
Retrieves a user-defined attribute of this message.
|
byte[] |
getContent() |
String |
getContentString() |
String |
getHeader(String name) |
Iterable<String> |
getHeaderNames() |
Iterable<String> |
getHeaders(String name) |
int |
getStatus() |
String |
getTargetHost()
Returns the host this response was received from, or null if it was not set.
|
void |
removeAttribute(String key) |
void |
removeHeader(String name) |
void |
setAttribute(String key,
Object value) |
void |
setContent(byte[] data) |
void |
setHeader(String name,
String value) |
void |
setStatus(int status) |
void |
setTargetHost(String host)
Sets the host this response was received from.
|
public static final String HTTP_TARGET_HOST
public int getStatus()
public void setStatus(int status)
public void setTargetHost(String host)
host
- originating hostpublic String getTargetHost()
public Object getAttribute(String key)
key
- attribute namepublic void removeAttribute(String key)
public void removeHeader(String name)
public void setContent(byte[] data)
public byte[] getContent()
public String getContentString()
Copyright © 2016. All rights reserved.