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(JsonFormat.Parser, JsonFormat.Printer)
DEFAULT_CHARSET, PROTOBUF, X_PROTOBUF_MESSAGE_HEADER, X_PROTOBUF_SCHEMA_HEADER
logger
コンストラクターと説明 |
---|
ProtobufJsonFormatHttpMessageConverter() デフォルトの JsonFormat.Parser および JsonFormat.Printer 構成で新しい ProtobufJsonFormatHttpMessageConverter を構築します。 |
ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer) 指定された JsonFormat.Parser および JsonFormat.Printer 構成で新しい ProtobufJsonFormatHttpMessageConverter を構築します。 |
ProtobufJsonFormatHttpMessageConverter(com.google.protobuf.util.JsonFormat.Parser parser, com.google.protobuf.util.JsonFormat.Printer printer, com.google.protobuf.ExtensionRegistry extensionRegistry) 指定された JsonFormat.Parser および JsonFormat.Printer 構成で新しい ProtobufJsonFormatHttpMessageConverter を作成し、プロトコルメッセージ拡張を指定するレジストリも受け入れます。 |
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
public ProtobufJsonFormatHttpMessageConverter()
JsonFormat.Parser
および JsonFormat.Printer
構成で新しい ProtobufJsonFormatHttpMessageConverter
を構築します。public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer)
JsonFormat.Parser
および JsonFormat.Printer
構成で新しい ProtobufJsonFormatHttpMessageConverter
を構築します。parser
- JSON パーサー構成 printer
- JSON プリンター構成 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
構成で新しい ProtobufJsonFormatHttpMessageConverter
を作成し、プロトコルメッセージ拡張を指定するレジストリも受け入れます。parser
- JSON パーサー構成 printer
- JSON プリンター構成 extensionRegistry
- 移入するレジストリ @DeprecatedSE public ProtobufJsonFormatHttpMessageConverter(@Nullable com.google.protobuf.util.JsonFormat.Parser parser, @Nullable com.google.protobuf.util.JsonFormat.Printer printer, @Nullable ExtensionRegistryInitializer registryInitializer)
ProtobufJsonFormatHttpMessageConverter(JsonFormat.Parser, JsonFormat.Printer, ExtensionRegistry)
を推奨 JsonFormat.Parser
および JsonFormat.Printer
構成で新しい ProtobufJsonFormatHttpMessageConverter
を構築し、メッセージ拡張の登録を可能にする初期化子も受け入れます。parser
- JSON パーサー構成 printer
- JSON プリンター構成 registryInitializer
- メッセージ拡張機能の初期化子