Class FileSubscriber

java.lang.Object
io.helidon.webclient.FileSubscriber
All Implemented Interfaces:
Flow.Subscriber<DataChunk>

@Deprecated(forRemoval=true) public final class FileSubscriber extends Object implements Flow.Subscriber<DataChunk>
Deprecated, for removal: This API element is subject to removal in a future version.
A file writer that subscribes to chunks of data.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(Path filePath)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a subscriber that consumes DataChunks and writes them to a file.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onError(Throwable throwable)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Subscribes this instance to the obtained publisher.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • subscribeTo

      public CompletionStage<Path> subscribeTo(Flow.Publisher<DataChunk> publisher)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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, for removal: This API element is subject to removal in a future version.
      Create a subscriber that consumes DataChunks and 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, for removal: This API element is subject to removal in a future version.
      Specified by:
      onSubscribe in interface Flow.Subscriber<DataChunk>
    • onNext

      public void onNext(DataChunk item)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onNext in interface Flow.Subscriber<DataChunk>
    • onError

      public void onError(Throwable throwable)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onError in interface Flow.Subscriber<DataChunk>
    • onComplete

      public void onComplete()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      onComplete in interface Flow.Subscriber<DataChunk>