public interface ResponseData extends Data
Callers setting response payloads are not allowed to set more than one type of response object. Doing so, results in an IllegalStateException.
Operations that dynamically process data conversion expect a data transformation service to have been configured. If one is not present, a DataXformException is raised.
This interface is implemented by z/OS Connect.
Modifier and Type | Method and Description |
---|---|
void |
setBytes(byte[] bytes)
Sets a byte array output to be converted to a JSONObject.
|
void |
setHttpResponseCode(int httpServletResponseCode)
Sets the HTTP servlet response code to be set in the response back to the caller.
|
void |
setJSON(com.ibm.json.java.JSONObject jsonObject)
Sets the JSONObject to be set in the response.
|
getAuthorizationAdminGroupName, getAuthorizationInvokeGroupName, getAuthorizationOperationsGroupName, getInputPayload, getInterceptorPreInvokeFailed, getOutputPayload, getRequestID, getServiceDescription, getServiceGroupingName, getServiceName, isDataTranformationAvailable
void setJSON(com.ibm.json.java.JSONObject jsonObject) throws java.io.IOException
jsonObject
- The JSONObject to set in the response. Null if there is no response.java.lang.IllegalStateException
- If the response already contains a return object.java.io.IOException
- If an error occurred while serializing the input JSON object.void setBytes(byte[] bytes) throws DataXformException, java.io.IOException
bytes
- The output bytes.java.lang.IllegalStateException
- If the response already contains a return object.DataXformException
- If there was an error while dynamically transforming the byte array payload to a
JSONObject or if a data transformation service is not available to convert the payload.java.io.IOException
- If an error occurred while serializing the JSON object obtained from the data transformer.void setHttpResponseCode(int httpServletResponseCode)
httpServletResponseCode
- The HTTP servlet's response code.