Package io.vertx.mutiny.httpproxy
Class BodyTransformers
java.lang.Object
io.vertx.mutiny.httpproxy.BodyTransformers
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<BodyTransformers>static final longThe default maximum amount of bytes synchronous transformers apply -
Constructor Summary
ConstructorsConstructorDescriptionBodyTransformers(io.vertx.httpproxy.BodyTransformers delegate) Create a new instance ofBodyTransformersdelegating to the given (non-null) instance ofBodyTransformers.BodyTransformers(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic BodyTransformerdiscard()Create a transformer that discards the body, the transformer consumes any media type.booleanio.vertx.httpproxy.BodyTransformersGet the delegate instance.inthashCode()static BodyTransformerjsonArray(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 producesapplication/json.static BodyTransformerLikejsonArray(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes.static BodyTransformerjsonObject(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 producesapplication/json.static BodyTransformerjsonObject(Function<io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject> transformer) LikejsonObject(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes.static BodyTransformerCreate a body transformer that transforms JSON value to JSON value, the transformer consumes and producesapplication/json.static BodyTransformerLikejsonValue(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes.static BodyTransformersnewInstance(io.vertx.httpproxy.BodyTransformers delegate) Creates a new instance of theBodyTransformers.static BodyTransformerCreate a transformer that transforms text to text, the transformer consumes and producestext/plain.static BodyTransformerLiketext(long, Function, String)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes.toString()static BodyTransformertransform(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 transformsconsumesmedia type to theproducesmedia type, by applying thetransformerfunction.static BodyTransformertransform(io.vertx.httpproxy.MediaType consumes, io.vertx.httpproxy.MediaType produces, Function<io.vertx.core.buffer.Buffer, io.vertx.core.buffer.Buffer> transformer) Liketransform(MediaType, MediaType, long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes.
-
Field Details
-
DEFAULT_MAX_BUFFERED_SIZE
public static final long DEFAULT_MAX_BUFFERED_SIZEThe default maximum amount of bytes synchronous transformers apply- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
BodyTransformers
public BodyTransformers(io.vertx.httpproxy.BodyTransformers delegate) Create a new instance ofBodyTransformersdelegating to the given (non-null) instance ofBodyTransformers. -
BodyTransformers
-
-
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:
getDelegatein interfaceMutinyDelegate- 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) Liketransform(MediaType, MediaType, long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes. -
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
consumesmedia type to theproducesmedia type, by applying thetransformerfunction.The transformer buffers up to
maxBufferedBytesand then apply thetransformerfunction. When the body exceeds the limit, the transformes signal an error and fail the transformation.- Parameters:
consumes- the consumed media typeproduces- the produced media typemaxBufferedBytes- the maximum amount of bytes buffered by the body transformertransformer- 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 producesapplication/json.- Parameters:
maxBufferedBytes- the maximum amount of bytes buffered by the body transformertransformer- the transformer function- Returns:
- the transformer instance
-
jsonObject
public static BodyTransformer jsonObject(Function<io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject> transformer) LikejsonObject(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum 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 producesapplication/json.- Parameters:
maxBufferedBytes- the maximum amount of bytes buffered by the body transformertransformer- the transformer function- Returns:
- the transformer instance
-
jsonArray
public static BodyTransformer jsonArray(Function<io.vertx.core.json.JsonArray, io.vertx.core.json.JsonArray> transformer) LikejsonArray(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes. -
jsonValue
Create a body transformer that transforms JSON value to JSON value, the transformer consumes and producesapplication/json.- Parameters:
maxBufferedBytes- the maximum amount of bytes buffered by the body transformertransformer- the transformer function- Returns:
- the transformer instance
-
jsonValue
LikejsonValue(long, Function)withDEFAULT_MAX_BUFFERED_SIZEmaximum 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 producestext/plain.- Parameters:
maxBufferedBytes- the maximum amount of bytes buffered by the body transformertransformer- the transformer function- Returns:
- the transformer instance
-
text
Liketext(long, Function, String)withDEFAULT_MAX_BUFFERED_SIZEmaximum buffered bytes. -
discard
Create a transformer that discards the body, the transformer consumes any media type.- Returns:
- the transformer instance
-
newInstance
Creates a new instance of theBodyTransformers. -
hashCode
public int hashCode() -
equals
-
toString
-