Interface ProtobufHttpMessageConverter.ProtobufFormatDelegate
- Enclosing class:
ProtobufHttpMessageConverter
protected static interface ProtobufHttpMessageConverter.ProtobufFormatDelegate
Contract to enable subclasses to plug in support for additional formats.
- Since:
- 4.1
- Author:
- Alex Antonov, Brian Clozel, Juergen Hoeller, Sebastien Deleuze, Kamil Doroszkiewicz
-
Method Summary
Modifier and TypeMethodDescriptionvoidmerge(HttpInputMessage inputMessage, MediaType contentType, Charset charset, com.google.protobuf.Message.Builder builder, com.google.protobuf.ExtensionRegistry extensionRegistry) Use merge methods onMessage.Builderto read a message from the givenHttpInputMessage.voidprint(com.google.protobuf.Message message, HttpOutputMessage outputMessage, MediaType contentType, Charset charset) Use print methods onMessage.Builderto write the message to the givenHttpOutputMessage.Return the supported media types for the converter.booleansupportsWriteOnly(@Nullable MediaType mediaType) Whether the media type is supported for writing.
-
Method Details
-
supportedMediaTypes
MediaType[] supportedMediaTypes()Return the supported media types for the converter.Note that
ProtobufHttpMessageConverter.PROTOBUF,ProtobufHttpMessageConverter.PLUS_PROTOBUF, andMediaType.TEXT_PLAINhave built-in support and can be listed in addition to formats specific to this delegate. -
supportsWriteOnly
-
merge
void merge(HttpInputMessage inputMessage, MediaType contentType, Charset charset, com.google.protobuf.Message.Builder builder, com.google.protobuf.ExtensionRegistry extensionRegistry) throws IOException, HttpMessageConversionException Use merge methods onMessage.Builderto read a message from the givenHttpInputMessage. -
print
void print(com.google.protobuf.Message message, HttpOutputMessage outputMessage, MediaType contentType, Charset charset) throws IOException, HttpMessageConversionException Use print methods onMessage.Builderto write the message to the givenHttpOutputMessage.
-