public class BinaryUploaderStream extends Object implements io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkResponse>
| Constructor and Description |
|---|
BinaryUploaderStream(@NonNull BinaryUploader binaryUploader,
@NonNull String binaryTransferUUID)
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.UploadChunkResponse uploadChunkResponse)
Callback when a get response is received
|
void |
startUpload(@NonNull io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkRequest> responseObserver)
Start upload by sending a upload request
BinaryUploader.getNextChunkUploadRequest(String) |
public BinaryUploaderStream(@NonNull
@NonNull BinaryUploader binaryUploader,
@NonNull
@NonNull String binaryTransferUUID)
binaryUploader - the binary uploader instancebinaryTransferUUID - the binary transfer UUIDpublic void startUpload(@NonNull
@NonNull io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkRequest> responseObserver)
BinaryUploader.getNextChunkUploadRequest(String)responseObserver - the response observerpublic void onNext(SiLABinaryTransfer.UploadChunkResponse uploadChunkResponse)
onNext in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkResponse>uploadChunkResponse - the upload chunk responsepublic void onError(Throwable throwable)
onError in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkResponse>throwable - the errorpublic void onCompleted()
onCompleted in interface io.grpc.stub.StreamObserver<SiLABinaryTransfer.UploadChunkResponse>Copyright © 2024 SiLA Java Developers. All rights reserved.