public class BinaryDownloaderStream extends Object implements io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkResponse>
| Constructor and Description |
|---|
BinaryDownloaderStream(@NonNull BinaryDownloader binaryDownloader,
SiLABinaryTransfer.GetBinaryInfoResponse binaryInfo)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted()
Callback when the stream is closed
|
void |
onError(Throwable throwable)
Callback when an error is received
|
void |
onNext(SiLABinaryTransfer.GetChunkResponse getChunkResponse)
Callback when a get response is received
|
void |
startDownload(io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkRequest> responseObserver)
Start download by sending a download request
BinaryDownloader.getNextChunkDownloadRequest(SiLABinaryTransfer.GetBinaryInfoResponse) |
public BinaryDownloaderStream(@NonNull
@NonNull BinaryDownloader binaryDownloader,
@NonNull
SiLABinaryTransfer.GetBinaryInfoResponse binaryInfo)
binaryDownloader - the binary downloader instancebinaryInfo - the binary informationpublic void startDownload(io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkRequest> responseObserver)
BinaryDownloader.getNextChunkDownloadRequest(SiLABinaryTransfer.GetBinaryInfoResponse)responseObserver - the response observerpublic void onNext(SiLABinaryTransfer.GetChunkResponse getChunkResponse)
onNext in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkResponse>getChunkResponse - the get chunk download responsepublic void onError(Throwable throwable)
onError in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkResponse>throwable - the errorpublic void onCompleted()
onCompleted in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.GetChunkResponse>Copyright © 2024 SiLA Java Developers. All rights reserved.