- 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 ofBodyPart
into an HTTP payload.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultiPartEncoder
create(String boundary, MessageBodyWriterContext context)
Create a multipart encoder.void
onComplete()
void
onError(Throwable throwable)
void
onNext(WriteableBodyPart bodyPart)
void
onSubscribe(Flow.Subscription subscription)
void
subscribe(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:
subscribe
in interfaceFlow.Publisher<DataChunk>
-
onSubscribe
public void onSubscribe(Flow.Subscription subscription)
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<WriteableBodyPart>
-
onNext
public void onNext(WriteableBodyPart bodyPart)
- Specified by:
onNext
in interfaceFlow.Subscriber<WriteableBodyPart>
-
onError
public void onError(Throwable throwable)
- Specified by:
onError
in interfaceFlow.Subscriber<WriteableBodyPart>
-
onComplete
public void onComplete()
- Specified by:
onComplete
in interfaceFlow.Subscriber<WriteableBodyPart>
-
-