Class PartEventHttpMessageWriter
java.lang.Object
org.springframework.http.codec.LoggingCodecSupport
org.springframework.http.codec.multipart.MultipartWriterSupport
org.springframework.http.codec.multipart.PartEventHttpMessageWriter
- All Implemented Interfaces:
- HttpMessageWriter<PartEvent>
public class PartEventHttpMessageWriter
extends MultipartWriterSupport
implements HttpMessageWriter<PartEvent>
HttpMessageWriter for writing PartEvent objects. Useful for
 server-side proxies, that relay multipart requests to others services.- Since:
- 6.0
- Author:
- Arjen Poutsma
- See Also:
- 
Field SummaryFields inherited from class org.springframework.http.codec.multipart.MultipartWriterSupportDEFAULT_CHARSETFields inherited from class org.springframework.http.codec.LoggingCodecSupportlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanWrite(ResolvableType elementType, MediaType mediaType) Whether the given object type is supported by this writer.reactor.core.publisher.Mono<Void>write(Publisher<? extends PartEvent> partDataStream, ResolvableType elementType, MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Write a given stream of object to the output message.Methods inherited from class org.springframework.http.codec.multipart.MultipartWriterSupportgenerateBoundaryLine, generateLastLine, generateMultipartBoundary, generateNewLine, generatePartHeaders, getCharset, getMultipartMediaType, getWritableMediaTypes, setCharsetMethods inherited from class org.springframework.http.codec.LoggingCodecSupportisEnableLoggingRequestDetails, setEnableLoggingRequestDetailsMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.codec.HttpMessageWritergetWritableMediaTypes, getWritableMediaTypes, write
- 
Constructor Details- 
PartEventHttpMessageWriterpublic PartEventHttpMessageWriter()
 
- 
- 
Method Details- 
canWriteDescription copied from interface:HttpMessageWriterWhether the given object type is supported by this writer.- Specified by:
- canWritein interface- HttpMessageWriter<PartEvent>
- Overrides:
- canWritein class- MultipartWriterSupport
- Parameters:
- elementType- the type of object to check
- mediaType- the media type for the write (possibly- null)
- Returns:
- trueif writable,- falseotherwise
 
- 
writepublic reactor.core.publisher.Mono<Void> write(Publisher<? extends PartEvent> partDataStream, ResolvableType elementType, @Nullable MediaType mediaType, ReactiveHttpOutputMessage outputMessage, Map<String, Object> hints) Description copied from interface:HttpMessageWriterWrite a given stream of object to the output message.- Specified by:
- writein interface- HttpMessageWriter<PartEvent>
- Parameters:
- partDataStream- the objects to write
- elementType- the type of objects in the stream which must have been previously checked via- HttpMessageWriter.canWrite(ResolvableType, MediaType)
- mediaType- the content type for the write (possibly- nullto indicate that the default content type of the writer must be used)
- outputMessage- the message to write to
- hints- additional information about how to encode and write
- Returns:
- indicates completion or error
 
 
-