- java.lang.Object
-
- io.helidon.media.multipart.MultiPartEncoder
-
- All Implemented Interfaces:
Flow.Processor<WriteableBodyPart,DataChunk>,Flow.Publisher<DataChunk>,Flow.Subscriber<WriteableBodyPart>
public class MultiPartEncoder extends Object implements Flow.Processor<WriteableBodyPart,DataChunk>
Reactive processor that encodes a stream ofBodyPartinto an HTTP payload.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultiPartEncodercreate(String boundary, MessageBodyWriterContext context)Create a multipart encoder.voidonComplete()voidonError(Throwable throwable)voidonNext(WriteableBodyPart bodyPart)voidonSubscribe(Flow.Subscription subscription)voidsubscribe(Flow.Subscriber<? super DataChunk> subscriber)
-
-
-
Method Detail
-
create
public static MultiPartEncoder create(String boundary, MessageBodyWriterContext context)
Create a multipart encoder.- Parameters:
boundary- boundary delimitercontext- writer context- Returns:
- MultiPartEncoder
-
subscribe
public void subscribe(Flow.Subscriber<? super DataChunk> subscriber)
- Specified by:
subscribein interfaceFlow.Publisher<DataChunk>
-
onSubscribe
public void onSubscribe(Flow.Subscription subscription)
- Specified by:
onSubscribein interfaceFlow.Subscriber<WriteableBodyPart>
-
onNext
public void onNext(WriteableBodyPart bodyPart)
- Specified by:
onNextin interfaceFlow.Subscriber<WriteableBodyPart>
-
onError
public void onError(Throwable throwable)
- Specified by:
onErrorin interfaceFlow.Subscriber<WriteableBodyPart>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceFlow.Subscriber<WriteableBodyPart>
-
-