Package io.vertx.reactivex.grpc.common
Class GrpcMessageEncoder<T>
- java.lang.Object
-
- io.vertx.reactivex.grpc.common.GrpcMessageEncoder<T>
-
public class GrpcMessageEncoder<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<GrpcMessageEncoder>
__TYPE_ARG
io.vertx.lang.rx.TypeArg<T>
__typeArg_0
static GrpcMessageEncoder<Buffer>
IDENTITY
static GrpcMessageEncoder<JsonObject>
JSON_OBJECT
An encoder in JSON format encoding instances.
-
Constructor Summary
Constructors Constructor Description GrpcMessageEncoder(GrpcMessageEncoder delegate)
GrpcMessageEncoder(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 GrpcMessage
encode(T msg)
boolean
equals(Object o)
WireFormat
format()
GrpcMessageEncoder
getDelegate()
int
hashCode()
static <T> GrpcMessageEncoder<T>
json()
Create and reutrn an encoder in JSON format encoding instances of using the protobuf-java-util library otherwise using (Jackson Databind is required).static <T> GrpcMessageEncoder<T>
newInstance(GrpcMessageEncoder arg)
static <T> GrpcMessageEncoder<T>
newInstance(GrpcMessageEncoder arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<GrpcMessageEncoder> __TYPE_ARG
-
__typeArg_0
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
-
IDENTITY
public static final GrpcMessageEncoder<Buffer> IDENTITY
-
JSON_OBJECT
public static final GrpcMessageEncoder<JsonObject> JSON_OBJECT
An encoder in JSON format encoding instances.
-
-
Constructor Detail
-
GrpcMessageEncoder
public GrpcMessageEncoder(GrpcMessageEncoder delegate)
-
-
Method Detail
-
getDelegate
public GrpcMessageEncoder getDelegate()
-
json
public static <T> GrpcMessageEncoder<T> json()
Create and reutrn an encoder in JSON format encoding instances of using the protobuf-java-util library otherwise using (Jackson Databind is required).- Returns:
- an encoder in JSON format encoding instances of
.
-
encode
public GrpcMessage encode(T msg)
-
format
public WireFormat format()
-
newInstance
public static <T> GrpcMessageEncoder<T> newInstance(GrpcMessageEncoder arg)
-
newInstance
public static <T> GrpcMessageEncoder<T> newInstance(GrpcMessageEncoder arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
-
-