Class BufferResult


  • public final class BufferResult
    extends RequestResponseResult<io.vertx.core.buffer.Buffer>
    A container for the opaque result of a request-response service invocation.
    • Method Detail

      • from

        public static BufferResult from​(int status)
        Creates a new result for a status code.
        Parameters:
        status - The status code.
        Returns:
        The result.
      • from

        public static BufferResult from​(int status,
                                        io.vertx.core.buffer.Buffer payload)
        Creates a new result for a status code and a payload.
        Parameters:
        status - The status code.
        payload - The payload to include in the result.
        Returns:
        The result.
      • from

        public static BufferResult from​(int status,
                                        String contentType,
                                        io.vertx.core.buffer.Buffer payload)
        Creates a new result for a status code and payload.
        Parameters:
        status - The status code.
        contentType - A media type describing the payload or null if unknown.
        payload - The payload to include in the result.
        Returns:
        The result.
      • from

        public static BufferResult from​(int status,
                                        String contentType,
                                        io.vertx.core.buffer.Buffer payload,
                                        org.apache.qpid.proton.amqp.messaging.ApplicationProperties applicationProperties)
        Creates a new result for a status code and payload.
        Parameters:
        status - The status code.
        contentType - A media type describing the payload or null if unknown.
        payload - The payload to include in the result.
        applicationProperties - Arbitrary properties conveyed in the response message's application-properties.
        Returns:
        The result.
      • getContentType

        public String getContentType()
        Gets the type of the payload.
        Returns:
        The media type describing the payload or null if unknown.