Class BodyCodec<T>


  • public class BodyCodec<T>
    extends Object
    A codec for encoding and decoding HTTP bodies.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • BodyCodec

        public BodyCodec​(io.vertx.ext.web.codec.BodyCodec delegate)
      • BodyCodec

        public BodyCodec​(Object delegate,
                         TypeArg<T> typeArg_0)
      • BodyCodec

        public BodyCodec​(io.vertx.ext.web.codec.BodyCodec delegate,
                         TypeArg<T> typeArg_0)
    • Method Detail

      • getDelegate

        public io.vertx.ext.web.codec.BodyCodec getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • string

        public static BodyCodec<String> string()
        Returns:
        the UTF-8 string codec
      • string

        public static BodyCodec<String> string​(String encoding)
        Parameters:
        encoding - the encoding
        Returns:
        the codec
      • jsonObject

        public static BodyCodec<io.vertx.core.json.JsonObject> jsonObject()
        Returns:
        the codec
      • jsonArray

        public static BodyCodec<io.vertx.core.json.JsonArray> jsonArray()
        Returns:
        the codec
      • json

        public static <U> BodyCodec<U> json​(Class<U> type)
        Parameters:
        type -
        Returns:
        a codec for mapping POJO to Json
      • none

        public static BodyCodec<Void> none()
        Returns:
        a codec that simply discards the response
      • create

        public static <T> BodyCodec<T> create​(Function<Buffer,​T> decode)
        Parameters:
        decode - the decode function
        Returns:
        the created codec
      • pipe

        public static BodyCodec<Void> pipe​(WriteStream<Buffer> stream)
        Parameters:
        stream - the destination stream
        Returns:
        the body codec for a write stream
      • pipe

        public static BodyCodec<Void> pipe​(WriteStream<Buffer> stream,
                                           boolean close)
        Parameters:
        stream - the destination stream
        close - whether the destination stream should be closed
        Returns:
        the body codec for a write stream
      • jsonStream

        public static BodyCodec<Void> jsonStream​(JsonParser parser)
        Parameters:
        parser - the non-null JSON parser to emits the JSON object. The parser must be configured for the stream. Not e that you need to keep a reference on the parser to retrieved the JSON events.
        Returns:
        the body codec for a write stream
      • newInstance

        public static <T> BodyCodec<T> newInstance​(io.vertx.ext.web.codec.BodyCodec arg)
      • newInstance

        public static <T> BodyCodec<T> newInstance​(io.vertx.ext.web.codec.BodyCodec arg,
                                                   TypeArg<T> __typeArg_T)