com.ibm.zosconnect.spi

Interface RequestData

  • All Superinterfaces:
    Data


    public interface RequestData
    extends Data
    Defines an object that holds data associated to a specific request.

    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.

    • Method Detail

      • getJSON

        com.ibm.json.java.JSONObject getJSON()
        Retrieves the JSONObject associated with the inbound HTTP request.
        Returns:
        The JSONObject. Null if the request has no payload.
      • getBytes

        byte[] getBytes()
                 throws DataXformException
        Dynamically converts an available JSON payload to a byte array. The payload is converted using the configured data transformation service.
        Returns:
        A byte representation of the JSONObject payload. Null if there is no payload.
        Throws:
        DataXformException - If there was an error while dynamically transforming the JSONObject payload to a byteArray or if a data transformation service is not available to convert the payload.
      • getPayloadDataSize

        java.lang.Long getPayloadDataSize()
                                   throws DataXformException
        Returns the size of the data in the request payload.
        Returns:
        The size of the data in the request payload.
        Throws:
        DataXformException - If there is a processing error.