Class GrpcMediaType

java.lang.Object
io.vertx.grpc.common.GrpcMediaType

@Unstable public final class GrpcMediaType extends Object
The gRPC media types.
  • Field Details

    • 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 Details

    • isGrpcWeb

      public static boolean isGrpcWeb(CharSequence mediaType)
      Whether the provided mediaType 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 provided mediaType 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)