public class ResponseWrapper
extends java.lang.Object
Constructor and Description |
---|
ResponseWrapper(Response response)
Instantiates a new response wrapper.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getEntity()
Gets the entity.
|
java.lang.String |
getEntityAsString()
Gets the entity as string.
|
Element |
getEntityAsXml()
Gets the entity as xml.
|
<any> |
getHeaders()
Gets the headers.
|
java.lang.String |
getReasonPhrase()
Gets the reason phrase.
|
Response.StatusType |
getStatus()
Gets the status.
|
int |
getStatusCode()
Gets the status code.
|
MediaType |
getType()
Gets the type.
|
boolean |
hasEntity()
Checks for entity.
|
boolean |
isSuccess()
Checks if the server responded with a 2xx status code
|
public ResponseWrapper(Response response) throws MaileonClientException
response
- the responseMaileonClientException
- the maileon client exceptionpublic Response.StatusType getStatus()
public int getStatusCode()
public java.lang.String getReasonPhrase()
public <any> getHeaders()
public MediaType getType()
public boolean hasEntity()
public boolean isSuccess()
public byte[] getEntity()
public java.lang.String getEntityAsString()
public Element getEntityAsXml() throws MaileonClientException
MaileonClientException
- the maileon client exceptionCopyright © 2017. All Rights Reserved.