类 ProtobufJsonFormatHttpMessageConverter
java.lang.Object
cn.taketoday.http.converter.AbstractHttpMessageConverter<com.google.protobuf.Message>
cn.taketoday.http.converter.protobuf.ProtobufHttpMessageConverter
cn.taketoday.http.converter.protobuf.ProtobufJsonFormatHttpMessageConverter
- 所有已实现的接口:
HttpMessageConverter<com.google.protobuf.Message>
Subclass of
ProtobufHttpMessageConverter which enforces the use of Protobuf 3 and
its official library "com.google.protobuf:protobuf-java-util" for JSON processing.
Most importantly, this class allows for custom JSON parser and printer configurations
through the JsonFormat utility. If no special parser or printer configuration is
given, default variants will be used instead.
Requires Protobuf 3.x and "com.google.protobuf:protobuf-java-util" 3.x,
with 3.3 or higher recommended.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Sebastien Deleuze
- 另请参阅:
-
JsonFormat.parser()JsonFormat.printer()ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser, com.google.protobuf.util.JsonFormat.Printer)
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.http.converter.protobuf.ProtobufHttpMessageConverter
ProtobufHttpMessageConverter.ProtobufFormatSupport, ProtobufHttpMessageConverter.ProtobufJavaFormatSupport, ProtobufHttpMessageConverter.ProtobufJavaUtilSupport -
字段概要
从类继承的字段 cn.taketoday.http.converter.protobuf.ProtobufHttpMessageConverter
DEFAULT_CHARSET, extensionRegistry, PROTOBUF, X_PROTOBUF_MESSAGE_HEADER, X_PROTOBUF_SCHEMA_HEADER从类继承的字段 cn.taketoday.http.converter.AbstractHttpMessageConverter
logger -
构造器概要
构造器构造器说明Constructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, and a default instance ofExtensionRegistry.ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer, com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry. -
方法概要
从类继承的方法 cn.taketoday.http.converter.protobuf.ProtobufHttpMessageConverter
canWrite, getDefaultContentType, readInternal, supports, writeInternal从类继承的方法 cn.taketoday.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
构造器详细资料
-
ProtobufJsonFormatHttpMessageConverter
public ProtobufJsonFormatHttpMessageConverter()Constructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry. -
ProtobufJsonFormatHttpMessageConverter
public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, and a default instance ofExtensionRegistry. -
ProtobufJsonFormatHttpMessageConverter
public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with given instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.
-