Class ProtobufJsonFormatMessageConverter
java.lang.Object
org.springframework.messaging.converter.AbstractMessageConverter
org.springframework.messaging.converter.ProtobufMessageConverter
org.springframework.messaging.converter.ProtobufJsonFormatMessageConverter
- All Implemented Interfaces:
- MessageConverter,- SmartMessageConverter
Subclass of 
ProtobufMessageConverter for use with the official
 "com.google.protobuf:protobuf-java-util" library for JSON support.
 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.
- Since:
- 5.2.2
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields inherited from class org.springframework.messaging.converter.ProtobufMessageConverterDEFAULT_CHARSET, PROTOBUFFields inherited from class org.springframework.messaging.converter.AbstractMessageConverterlogger
- 
Constructor SummaryConstructorsConstructorDescriptionProtobufJsonFormatMessageConverter(com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.ProtobufJsonFormatMessageConverter(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.ProtobufJsonFormatMessageConverter(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.
- 
Method SummaryMethods inherited from class org.springframework.messaging.converter.ProtobufMessageConvertercanConvertTo, convertFromInternal, convertToInternal, supportsMethods inherited from class org.springframework.messaging.converter.AbstractMessageConverteraddSupportedMimeTypes, canConvertFrom, fromMessage, fromMessage, getContentTypeResolver, getDefaultContentType, getMimeType, getSerializedPayloadClass, getSupportedMimeTypes, isStrictContentTypeMatch, setContentTypeResolver, setSerializedPayloadClass, setStrictContentTypeMatch, supportsMimeType, toMessage, toMessage
- 
Constructor Details- 
ProtobufJsonFormatMessageConverterpublic ProtobufJsonFormatMessageConverter(@Nullable com.google.protobuf.ExtensionRegistry extensionRegistry) Constructor with default instances ofJsonFormat.Parser,JsonFormat.Printer, andExtensionRegistry.
- 
ProtobufJsonFormatMessageConverterpublic ProtobufJsonFormatMessageConverter(@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.
- 
ProtobufJsonFormatMessageConverterpublic ProtobufJsonFormatMessageConverter(@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.
 
-