Interface RemoteConnectorResponse
-
- All Known Implementing Classes:
RemoteConnectorResponseImpl
public interface RemoteConnectorResponseHelper wrapper around a Remote Response, for a request that was executed byRemoteConnectorService.- Since:
- 4.0.2
- Author:
- Nick Burch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCharset()java.lang.StringgetContentType()java.lang.StringgetRawContentType()RemoteConnectorRequestgetRequest()byte[]getResponseBodyAsBytes()java.io.InputStreamgetResponseBodyAsStream()java.lang.StringgetResponseBodyAsString()org.apache.commons.httpclient.Header[]getResponseHeaders()intgetStatus()
-
-
-
Method Detail
-
getRequest
RemoteConnectorRequest getRequest()
- Returns:
- The request that generated this response
-
getStatus
int getStatus()
- Returns:
- The HTTP
StatusCode for the response
-
getRawContentType
java.lang.String getRawContentType()
- Returns:
- The raw response content type, if available
-
getContentType
java.lang.String getContentType()
- Returns:
- The mimetype of the response content, if available
-
getCharset
java.lang.String getCharset()
- Returns:
- The charset of the response content, if available
-
getResponseHeaders
org.apache.commons.httpclient.Header[] getResponseHeaders()
- Returns:
- All of the response headers
-
getResponseBodyAsStream
java.io.InputStream getResponseBodyAsStream() throws java.io.IOException- Returns:
- The response data, as a stream
- Throws:
java.io.IOException
-
getResponseBodyAsBytes
byte[] getResponseBodyAsBytes() throws java.io.IOException- Returns:
- The response data, as a byte array
- Throws:
java.io.IOException
-
getResponseBodyAsString
java.lang.String getResponseBodyAsString() throws java.io.IOException- Returns:
- The response as a string, based on the response content type charset
- Throws:
java.io.IOException
-
-