- All Known Subinterfaces:
FlightSqlProducer
- All Known Implementing Classes:
BasicFlightSqlProducer
,NoOpFlightProducer
,NoOpFlightSqlProducer
public interface FlightProducer
API to Implement an Arrow Flight producer.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Call-specific context.static interface
An interface for sending Arrow data back to a client.static interface
Callbacks for pushing objects to a receiver. -
Method Summary
Modifier and TypeMethodDescriptionacceptPut
(FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accept uploaded data for a particular stream.void
doAction
(FlightProducer.CallContext context, Action action, FlightProducer.StreamListener<Result> listener) Generic handler for application-defined RPCs.default void
doExchange
(FlightProducer.CallContext context, FlightStream reader, FlightProducer.ServerStreamListener writer) This method is used to perform a bidirectional data exchange between a client and a server.getFlightInfo
(FlightProducer.CallContext context, FlightDescriptor descriptor) Get information about a particular data stream.default SchemaResult
getSchema
(FlightProducer.CallContext context, FlightDescriptor descriptor) Get schema for a particular data stream.void
getStream
(FlightProducer.CallContext context, Ticket ticket, FlightProducer.ServerStreamListener listener) Return data for a stream.void
listActions
(FlightProducer.CallContext context, FlightProducer.StreamListener<ActionType> listener) List available application-defined RPCs.void
listFlights
(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) List available data streams on this service.default PollInfo
pollFlightInfo
(FlightProducer.CallContext context, FlightDescriptor descriptor) Begin or get an update on execution of a long-running query.
-
Method Details
-
getStream
void getStream(FlightProducer.CallContext context, Ticket ticket, FlightProducer.ServerStreamListener listener) Return data for a stream.- Parameters:
context
- Per-call context.ticket
- The application-defined ticket identifying this stream.listener
- An interface for sending data back to the client.
-
listFlights
void listFlights(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) List available data streams on this service.- Parameters:
context
- Per-call context.criteria
- Application-defined criteria for filtering streams.listener
- An interface for sending data back to the client.
-
getFlightInfo
Get information about a particular data stream.- Parameters:
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
pollFlightInfo
Begin or get an update on execution of a long-running query.If the descriptor would begin a query, the server should return a response immediately to not block the client. Otherwise, the server should not return an update until progress is made to not spam the client with inactionable updates.
- Parameters:
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about execution.
-
getSchema
Get schema for a particular data stream.- Parameters:
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Schema for the stream.
-
acceptPut
Runnable acceptPut(FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accept uploaded data for a particular stream.- Parameters:
context
- Per-call context.flightStream
- The data stream being uploaded.
-
doExchange
default void doExchange(FlightProducer.CallContext context, FlightStream reader, FlightProducer.ServerStreamListener writer) This method is used to perform a bidirectional data exchange between a client and a server.- Parameters:
context
- Per-call context.reader
- The FlightStream from which data is read.writer
- The ServerStreamListener to which data is written.- Throws:
RuntimeException
- if the method is not implemented.
-
doAction
void doAction(FlightProducer.CallContext context, Action action, FlightProducer.StreamListener<Result> listener) Generic handler for application-defined RPCs.- Parameters:
context
- Per-call context.action
- Client-supplied parameters.listener
- A stream of responses.
-
listActions
void listActions(FlightProducer.CallContext context, FlightProducer.StreamListener<ActionType> listener) List available application-defined RPCs.- Parameters:
context
- Per-call context.listener
- An interface for sending data back to the client.
-