Package io.vertx.rxjava3.grpc.common
Class GrpcMessageDecoder<T>
- java.lang.Object
-
- io.vertx.rxjava3.grpc.common.GrpcMessageDecoder<T>
-
public class GrpcMessageDecoder<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<GrpcMessageDecoder>
__TYPE_ARG
io.vertx.lang.rx.TypeArg<T>
__typeArg_0
static GrpcMessageDecoder<Buffer>
IDENTITY
static GrpcMessageDecoder<JsonObject>
JSON_OBJECT
A decoder in JSON format decoding to instances of .static GrpcMessageDecoder<Object>
JSON_VALUE
A decoder in JSON format decoding arbitrary JSON values: , or string/number/boolean/null
-
Constructor Summary
Constructors Constructor Description GrpcMessageDecoder(GrpcMessageDecoder delegate)
GrpcMessageDecoder(Object delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
decode(GrpcMessage msg)
boolean
equals(Object o)
WireFormat
format()
GrpcMessageDecoder
getDelegate()
int
hashCode()
static <T> GrpcMessageDecoder<T>
json(Class<T> clazz)
Create a decoder in JSON format decoding to instances of theclazz
using (Jackson Databind is required).static <T> GrpcMessageDecoder<T>
newInstance(GrpcMessageDecoder arg)
static <T> GrpcMessageDecoder<T>
newInstance(GrpcMessageDecoder arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<GrpcMessageDecoder> __TYPE_ARG
-
__typeArg_0
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
-
IDENTITY
public static final GrpcMessageDecoder<Buffer> IDENTITY
-
JSON_OBJECT
public static final GrpcMessageDecoder<JsonObject> JSON_OBJECT
A decoder in JSON format decoding to instances of .
-
JSON_VALUE
public static final GrpcMessageDecoder<Object> JSON_VALUE
A decoder in JSON format decoding arbitrary JSON values: , or string/number/boolean/null
-
-
Constructor Detail
-
GrpcMessageDecoder
public GrpcMessageDecoder(GrpcMessageDecoder delegate)
-
-
Method Detail
-
getDelegate
public GrpcMessageDecoder getDelegate()
-
json
public static <T> GrpcMessageDecoder<T> json(Class<T> clazz)
Create a decoder in JSON format decoding to instances of theclazz
using (Jackson Databind is required).- Parameters:
clazz
- the java type to decode- Returns:
- a decoder that decodes messages to instance of
clazz
in JSON format.
-
decode
public T decode(GrpcMessage msg)
-
format
public WireFormat format()
-
newInstance
public static <T> GrpcMessageDecoder<T> newInstance(GrpcMessageDecoder arg)
-
newInstance
public static <T> GrpcMessageDecoder<T> newInstance(GrpcMessageDecoder arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
-
-