Package io.vertx.grpc.common
Class GrpcMediaType
- java.lang.Object
-
- io.vertx.grpc.common.GrpcMediaType
-
@Unstable public final class GrpcMediaType extends Object
The gRPC media types.
-
-
Field Summary
Fields Modifier and Type Field Description static CharSequence
GRPC
gRPC.static CharSequence
GRPC_PROTO
gRPC with Protobuf message format.static CharSequence
GRPC_WEB
gRPC Web binary.static CharSequence
GRPC_WEB_PROTO
gRPC Web binary with Protobuf message format.static CharSequence
GRPC_WEB_TEXT
gRPC Web text (base64).static CharSequence
GRPC_WEB_TEXT_PROTO
gRPC Web text (base64) with Protobuf message format.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isGrpcWeb(CharSequence mediaType)
Whether the providedmediaType
represents gRPC-Webstatic boolean
isGrpcWebText(CharSequence mediaType)
Whether the providedmediaType
represents gRPC-Webstatic WireFormat
parseContentType(String contentType, String mediaType)
-
-
-
Field Detail
-
GRPC
public static final CharSequence GRPC
gRPC.
-
GRPC_PROTO
public static final CharSequence GRPC_PROTO
gRPC with Protobuf message format.
-
GRPC_WEB
public static final CharSequence GRPC_WEB
gRPC Web binary.
-
GRPC_WEB_PROTO
public static final CharSequence GRPC_WEB_PROTO
gRPC Web binary with Protobuf message format.
-
GRPC_WEB_TEXT
public static final CharSequence GRPC_WEB_TEXT
gRPC Web text (base64).
-
GRPC_WEB_TEXT_PROTO
public static final CharSequence GRPC_WEB_TEXT_PROTO
gRPC Web text (base64) with Protobuf message format.
-
-
Method Detail
-
isGrpcWeb
public static boolean isGrpcWeb(CharSequence mediaType)
Whether the providedmediaType
represents gRPC-Web- Parameters:
mediaType
- the value to test- Returns:
true
if the value represents gRPC-Web,false
otherwise
-
isGrpcWebText
public static boolean isGrpcWebText(CharSequence mediaType)
Whether the providedmediaType
represents gRPC-Web- Parameters:
mediaType
- the value to test- Returns:
true
if the value represents gRPC-Web,false
otherwise
-
parseContentType
public static WireFormat parseContentType(String contentType, String mediaType)
-
-