public class AsyncPutListener extends Object implements FlightClient.PutListener
To handle messages, create an instance of this class overriding onNext(PutResult). The other methods
should not be overridden.
| Constructor and Description |
|---|
AsyncPutListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
getResult()
Wait for the stream to finish on the server side.
|
boolean |
isCancelled()
Check if the call has been cancelled.
|
void |
onCompleted()
Indicate that the transmission is finished.
|
void |
onError(Throwable t)
Indicate an error to the client.
|
void |
onNext(PutResult val)
Called when a message from the server is received.
|
public final void getResult()
getResult in interface FlightClient.PutListenerpublic void onNext(PutResult val)
FlightClient.PutListeneronNext in interface FlightClient.PutListeneronNext in interface FlightProducer.StreamListener<PutResult>val - The application metadata. This buffer will be reclaimed once onNext returns; you must retain a
reference to use it outside this method.public final void onError(Throwable t)
FlightProducer.StreamListenerTerminates the stream; do not call FlightProducer.StreamListener.onCompleted().
onError in interface FlightProducer.StreamListener<PutResult>public final void onCompleted()
FlightProducer.StreamListeneronCompleted in interface FlightProducer.StreamListener<PutResult>public boolean isCancelled()
FlightClient.PutListenerBy default, this always returns false. Implementations should provide an appropriate implementation, as otherwise, a DoPut operation may inadvertently block forever.
isCancelled in interface FlightClient.PutListenerCopyright © 2021 The Apache Software Foundation. All rights reserved.