- java.lang.Object
-
- io.helidon.webclient.FileSubscriber
-
- All Implemented Interfaces:
Flow.Subscriber<DataChunk>
@Deprecated public final class FileSubscriber extends Object implements Flow.Subscriber<DataChunk>
Deprecated.This will most likely be removed when multipart is implemented.A file writer that subscribes to chunks of data.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FileSubscribercreate(Path filePath)Deprecated.Create a subscriber that consumesDataChunksand writes them to a file.voidonComplete()Deprecated.voidonError(Throwable throwable)Deprecated.voidonNext(DataChunk item)Deprecated.voidonSubscribe(Flow.Subscription subscription)Deprecated.CompletionStage<Path>subscribeTo(Flow.Publisher<DataChunk> publisher)Deprecated.Subscribes this instance to the obtained publisher.
-
-
-
Method Detail
-
subscribeTo
public CompletionStage<Path> subscribeTo(Flow.Publisher<DataChunk> publisher)
Deprecated.Subscribes this instance to the obtained publisher.- Parameters:
publisher- publisher- Returns:
- completion stage of the saving process
-
create
public static FileSubscriber create(Path filePath)
Deprecated.Create a subscriber that consumesDataChunksand writes them to a file. A temporary file is created first to download the whole content and it is then moved to the final destination.- Parameters:
filePath- path of the final file- Returns:
- subscriber to consume
DataChunk
-
onSubscribe
public void onSubscribe(Flow.Subscription subscription)
Deprecated.- Specified by:
onSubscribein interfaceFlow.Subscriber<DataChunk>
-
onNext
public void onNext(DataChunk item)
Deprecated.- Specified by:
onNextin interfaceFlow.Subscriber<DataChunk>
-
onError
public void onError(Throwable throwable)
Deprecated.- Specified by:
onErrorin interfaceFlow.Subscriber<DataChunk>
-
onComplete
public void onComplete()
Deprecated.- Specified by:
onCompletein interfaceFlow.Subscriber<DataChunk>
-
-