Interface FlightClient.PutListener

All Superinterfaces:
FlightProducer.StreamListener<PutResult>
All Known Implementing Classes:
AsyncPutListener, SyncPutListener
Enclosing class:
FlightClient

public static interface FlightClient.PutListener extends FlightProducer.StreamListener<PutResult>
A handler for server-sent application metadata messages during a Flight DoPut operation.

Generally, instead of implementing this yourself, you should use AsyncPutListener or SyncPutListener.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Wait for the stream to finish on the server side.
    default boolean
    Check if the call has been cancelled.
    void
    Called when a message from the server is received.

    Methods inherited from interface org.apache.arrow.flight.FlightProducer.StreamListener

    onCompleted, onError
  • Method Details

    • getResult

      void getResult()
      Wait for the stream to finish on the server side. You must call this to be notified of any errors that may have happened during the upload.
    • onNext

      void onNext(PutResult val)
      Called when a message from the server is received.
      Specified by:
      onNext in interface FlightProducer.StreamListener<PutResult>
      Parameters:
      val - The application metadata. This buffer will be reclaimed once onNext returns; you must retain a reference to use it outside this method.
    • isCancelled

      default boolean isCancelled()
      Check if the call has been cancelled.

      By default, this always returns false. Implementations should provide an appropriate implementation, as otherwise, a DoPut operation may inadvertently block forever.