public class ProtobufJsonFormatHttpMessageConverter extends ProtobufHttpMessageConverter
"com.google.protobuf:protobuf-java-util"
の使用を強制する ProtobufHttpMessageConverter
のサブクラス。 最も重要なこととして、このクラスは、JsonFormat
ユーティリティを介してカスタム JSON パーサーおよびプリンター構成を可能にします。特別なパーサーまたはプリンター構成が指定されていない場合は、代わりにデフォルトのバリアントが使用されます。
Protobuf 3.x および "com.google.protobuf:protobuf-java-util"
3.x が必要です。3.3 以上を推奨します。
JsonFormat.parser()
, JsonFormat.printer()
, ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser, com.google.protobuf.util.JsonFormat.Printer)
DEFAULT_CHARSET, PROTOBUF, X_PROTOBUF_MESSAGE_HEADER, X_PROTOBUF_SCHEMA_HEADER
logger
コンストラクターと説明 |
---|
ProtobufJsonFormatHttpMessageConverter() JsonFormat.Parser 、JsonFormat.Printer 、ExtensionRegistry のデフォルトインスタンスを持つコンストラクター。 |
ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer) JsonFormat.Parser 、JsonFormat.Printer の特定のインスタンス、ExtensionRegistry のデフォルトインスタンスを持つコンストラクター。 |
ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer, com.google.protobuf.ExtensionRegistry extensionRegistry) JsonFormat.Parser 、JsonFormat.Printer 、ExtensionRegistry の特定のインスタンスを持つコンストラクター。 |
ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer, ExtensionRegistryInitializer registryInitializer) |
canWrite, getDefaultContentType, readInternal, supports, writeInternal
addDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
getSupportedMediaTypes
public ProtobufJsonFormatHttpMessageConverter()
JsonFormat.Parser
、JsonFormat.Printer
、ExtensionRegistry
のデフォルトインスタンスを持つコンストラクター。public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer)
JsonFormat.Parser
、JsonFormat.Printer
の特定のインスタンス、ExtensionRegistry
のデフォルトインスタンスを持つコンストラクター。public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable com.google.protobuf.ExtensionRegistry extensionRegistry)
JsonFormat.Parser
、JsonFormat.Printer
、ExtensionRegistry
の特定のインスタンスを持つコンストラクター。@DeprecatedSE public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable ExtensionRegistryInitializer registryInitializer)
JsonFormat.Parser
および JsonFormat.Printer
構成で新しい ProtobufJsonFormatHttpMessageConverter
を構築し、メッセージ拡張の登録を可能にする初期化子も受け入れます。parser
- JSON パーサー構成 printer
- JSON プリンター構成 registryInitializer
- メッセージ拡張機能の初期化子