Interface Payload

  • All Superinterfaces:
    AutoCloseable, Closeable
    All Known Subinterfaces:
    ExtendedPayload
    All Known Implementing Classes:
    BasePayload

    public interface Payload
    extends Closeable
    A Payload encapsulates result data in some form. Either the data is readily available as an InputStream or can be written into an OutputStream. A payload is consumed by first calling readFrom() and seeing if the result is non-null. If so, that stream is read and closed. If the result is null, then the writeTo(java.io.OutputStream) method will be called with an OutputStream which can be filled with the payload data. Moved this interface from commonsdk to connector-sdk-api to ensure strict and non-strict connectors can access this functionality independently.