Class BodyTransformers

java.lang.Object
io.vertx.mutiny.httpproxy.BodyTransformers
All Implemented Interfaces:
MutinyDelegate

public class BodyTransformers extends Object implements MutinyDelegate
Range of transformers ready to be used.

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

See Also:
  • BodyTransformers
  • Field Details

    • DEFAULT_MAX_BUFFERED_SIZE

      public static final long DEFAULT_MAX_BUFFERED_SIZE
      The default maximum amount of bytes synchronous transformers apply
      See Also:
    • __TYPE_ARG

      public static final TypeArg<BodyTransformers> __TYPE_ARG
  • Constructor Details

    • BodyTransformers

      public BodyTransformers(io.vertx.httpproxy.BodyTransformers delegate)
      Create a new instance of BodyTransformers delegating to the given (non-null) instance of BodyTransformers.
    • BodyTransformers

      public BodyTransformers(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.httpproxy.BodyTransformers getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • transform

      public static BodyTransformer transform(io.vertx.httpproxy.MediaType consumes, io.vertx.httpproxy.MediaType produces, Function<io.vertx.core.buffer.Buffer,io.vertx.core.buffer.Buffer> transformer)
    • transform

      public static BodyTransformer transform(io.vertx.httpproxy.MediaType consumes, io.vertx.httpproxy.MediaType produces, long maxBufferedBytes, Function<io.vertx.core.buffer.Buffer,io.vertx.core.buffer.Buffer> transformer)

      Create a body transformer that transforms consumes media type to the produces media type, by applying the transformer function.

      The transformer buffers up to maxBufferedBytes and then apply the transformer function. When the body exceeds the limit, the transformes signal an error and fail the transformation.

      Parameters:
      consumes - the consumed media type
      produces - the produced media type
      maxBufferedBytes - the maximum amount of bytes buffered by the body transformer
      transformer - the transformer
      Returns:
      the body transformer
    • jsonObject

      public static BodyTransformer jsonObject(long maxBufferedBytes, Function<io.vertx.core.json.JsonObject,io.vertx.core.json.JsonObject> transformer)
      Create a body transformer that transforms JSON object to JSON object, the transformer consumes and produces application/json.
      Parameters:
      maxBufferedBytes - the maximum amount of bytes buffered by the body transformer
      transformer - the transformer function
      Returns:
      the transformer instance
    • jsonObject

      public static BodyTransformer jsonObject(Function<io.vertx.core.json.JsonObject,io.vertx.core.json.JsonObject> transformer)
      Like jsonObject(long, Function) with DEFAULT_MAX_BUFFERED_SIZE maximum buffered bytes.
    • jsonArray

      public static BodyTransformer jsonArray(long maxBufferedBytes, Function<io.vertx.core.json.JsonArray,io.vertx.core.json.JsonArray> transformer)
      Create a body transformer that transforms JSON array to JSON array, the transformer consumes and produces application/json.
      Parameters:
      maxBufferedBytes - the maximum amount of bytes buffered by the body transformer
      transformer - the transformer function
      Returns:
      the transformer instance
    • jsonArray

      public static BodyTransformer jsonArray(Function<io.vertx.core.json.JsonArray,io.vertx.core.json.JsonArray> transformer)
      Like jsonArray(long, Function) with DEFAULT_MAX_BUFFERED_SIZE maximum buffered bytes.
    • jsonValue

      public static BodyTransformer jsonValue(long maxBufferedBytes, Function<Object,Object> transformer)
      Create a body transformer that transforms JSON value to JSON value, the transformer consumes and produces application/json.
      Parameters:
      maxBufferedBytes - the maximum amount of bytes buffered by the body transformer
      transformer - the transformer function
      Returns:
      the transformer instance
    • jsonValue

      public static BodyTransformer jsonValue(Function<Object,Object> transformer)
      Like jsonValue(long, Function) with DEFAULT_MAX_BUFFERED_SIZE maximum buffered bytes.
    • text

      public static BodyTransformer text(long maxBufferedBytes, Function<String,String> transformer, String encoding)
      Create a transformer that transforms text to text, the transformer consumes and produces text/plain.
      Parameters:
      maxBufferedBytes - the maximum amount of bytes buffered by the body transformer
      transformer - the transformer function
      Returns:
      the transformer instance
    • text

      public static BodyTransformer text(Function<String,String> transformer, String encoding)
    • discard

      public static BodyTransformer discard()
      Create a transformer that discards the body, the transformer consumes any media type.
      Returns:
      the transformer instance
    • newInstance

      public static BodyTransformers newInstance(io.vertx.httpproxy.BodyTransformers delegate)
      Creates a new instance of the BodyTransformers.
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object