java.lang.Object
org.apache.arrow.flight.FlightServer.Builder
- Enclosing class:
- FlightServer
A builder for Flight servers.
-
Method Summary
Modifier and TypeMethodDescriptionallocator
(BufferAllocator allocator) authHandler
(ServerAuthHandler authHandler) Set the authentication handler.backpressureThreshold
(int backpressureThreshold) Set the number of bytes that may be queued on a server output stream before writes are blocked.build()
Create the server for this builder.executor
(ExecutorService executor) Set the executor used by the server.headerAuthenticator
(CallHeaderAuthenticator headerAuthenticator) Set the header-based authentication mechanism.maxInboundMessageSize
(int maxMessageSize) Set the maximum size of a message.<T extends FlightServerMiddleware>
FlightServer.Buildermiddleware
(FlightServerMiddleware.Key<T> key, FlightServerMiddleware.Factory<T> factory) Add a Flight middleware component to inspect and modify requests to this service.producer
(FlightProducer producer) setMaxHeaderListSize
(int maxHeaderListSize) transportHint
(String key, Object option) Provide a transport-specific option.useMTlsClientVerification
(File mTlsCACert) Enable Client Verification via mTLS on the server.useMTlsClientVerification
(InputStream mTlsCACert) Enable mTLS on the server.Enable TLS on the server.useTls
(InputStream certChain, InputStream key) Enable TLS on the server.
-
Method Details
-
build
Create the server for this builder. -
setMaxHeaderListSize
-
maxInboundMessageSize
Set the maximum size of a message. Defaults to "unlimited", depending on the underlying transport. -
backpressureThreshold
Set the number of bytes that may be queued on a server output stream before writes are blocked. -
useTls
Enable TLS on the server.- Parameters:
certChain
- The certificate chain to use.key
- The private key to use.- Throws:
IOException
-
useMTlsClientVerification
Enable Client Verification via mTLS on the server.- Parameters:
mTlsCACert
- The CA certificate to use for verifying clients.- Throws:
IOException
-
useTls
Enable TLS on the server.- Parameters:
certChain
- The certificate chain to use.key
- The private key to use.- Throws:
IOException
-
useMTlsClientVerification
Enable mTLS on the server.- Parameters:
mTlsCACert
- The CA certificate to use for verifying clients.- Throws:
IOException
-
executor
Set the executor used by the server.Flight will NOT take ownership of the executor. The application must clean it up if one is provided. (If not provided, Flight will use a default executor which it will clean up.)
-
authHandler
Set the authentication handler. -
headerAuthenticator
Set the header-based authentication mechanism. -
transportHint
Provide a transport-specific option. Not guaranteed to have any effect. -
middleware
public <T extends FlightServerMiddleware> FlightServer.Builder middleware(FlightServerMiddleware.Key<T> key, FlightServerMiddleware.Factory<T> factory) Add a Flight middleware component to inspect and modify requests to this service.- Type Parameters:
T
- The middleware type.- Parameters:
key
- An identifier for this middleware component. Service implementations can retrieve the middleware instance for the current call usingFlightProducer.CallContext
.factory
- A factory for the middleware.- Throws:
IllegalArgumentException
- if the key already exists
-
allocator
-
location
-
producer
-