HttpMessageWriter that can write a protobuf Message and adds
X-Protobuf-Schema, X-Protobuf-Message headers and a
delimited=true parameter is added to the content type if a flux is serialized.
For HttpMessageReader, just use
new DecoderHttpMessageReader(new ProtobufDecoder()).
ProtobufEncoder
| Modifier and Type | Field and Description |
|---|---|
| private static final ConcurrentMap | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ProtobufHttpMessageWriter(Encoder<Message>
the Protobuf message encoder to use encoder)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| private static Message. | |
| public Mono | write(Publisher<? extends Message>
the objects to write inputStream, ResolvableType the type of objects in the stream which must have been
previously checked via elementType, MediaType canWrite(ResolvableType, MediaType)the content type for the write (possibly mediaType, ReactiveHttpOutputMessage null to
indicate that the default content type of the writer must be used)the message to write to message, Map<String, Object> additional information about how to encode and write hints)Overrides org. Implements org. Write a given stream of object to the output message. |
| methodCache | back to summary |
|---|---|
| private static final ConcurrentMap<Class<?>, Method> methodCache | |
| X_PROTOBUF_MESSAGE_HEADER | back to summary |
|---|---|
| private static final String X_PROTOBUF_MESSAGE_HEADER | |
| X_PROTOBUF_SCHEMA_HEADER | back to summary |
|---|---|
| private static final String X_PROTOBUF_SCHEMA_HEADER | |
| ProtobufHttpMessageWriter | back to summary |
|---|---|
| public ProtobufHttpMessageWriter() Create a new | |
| ProtobufHttpMessageWriter | back to summary |
|---|---|
| public ProtobufHttpMessageWriter(Encoder<Message> encoder) Create a new | |
| getMessageBuilder | back to summary |
|---|---|
| private static Message. Create a new This method uses a ConcurrentHashMap for caching method lookups. | |
| write | back to summary |
|---|---|
| public Mono Overrides org. Implements org. Doc from org. Write a given stream of object to the output message.
| |