public class IntegrationProducer extends NoOpFlightProducer implements AutoCloseable
FlightProducer.CallContext, FlightProducer.ServerStreamListener, FlightProducer.StreamListener<T>
Constructor and Description |
---|
IntegrationProducer(BufferAllocator allocator,
Location location)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
Runnable |
acceptPut(FlightProducer.CallContext context,
FlightStream flightStream,
FlightProducer.StreamListener<PutResult> ackStream)
Accept uploaded data for a particular stream.
|
void |
close() |
FlightInfo |
getFlightInfo(FlightProducer.CallContext context,
FlightDescriptor descriptor)
Get information about a particular data stream.
|
void |
getStream(FlightProducer.CallContext context,
Ticket ticket,
FlightProducer.ServerStreamListener listener)
Return data for a stream.
|
void |
setLocation(Location location)
Update the location after server start.
|
doAction, listActions, listFlights
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doExchange, getSchema
public IntegrationProducer(BufferAllocator allocator, Location location)
allocator
- The allocator for creating new Arrow buffers.location
- The location of the storage.public void setLocation(Location location)
Useful for binding to port 0 to get a free port.
public void getStream(FlightProducer.CallContext context, Ticket ticket, FlightProducer.ServerStreamListener listener)
FlightProducer
getStream
in interface FlightProducer
getStream
in class NoOpFlightProducer
context
- Per-call context.ticket
- The application-defined ticket identifying this stream.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfo(FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightProducer
getFlightInfo
in interface FlightProducer
getFlightInfo
in class NoOpFlightProducer
context
- Per-call context.descriptor
- The descriptor identifying the data stream.public Runnable acceptPut(FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream)
FlightProducer
acceptPut
in interface FlightProducer
acceptPut
in class NoOpFlightProducer
context
- Per-call context.flightStream
- The data stream being uploaded.public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2023 The Apache Software Foundation. All rights reserved.