public class FlightSqlClientDemoApp extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
BufferAllocator |
allocator |
List<CallOption> |
callOptions |
FlightSqlClient |
flightSqlClient |
Constructor and Description |
---|
FlightSqlClientDemoApp(BufferAllocator bufferAllocator) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
createFlightSqlClient(String host,
int port)
Creates a
FlightSqlClient to be used with the example methods. |
void |
executeApp(org.apache.commons.cli.CommandLine cmd)
Calls
createFlightSqlClient(String, int)
in order to create a FlightSqlClient to be used in future calls,
and then calls executeCommand(CommandLine)
to execute the command parsed at execution. |
void |
executeCommand(org.apache.commons.cli.CommandLine cmd)
Parses the "
command " CLI argument and redirects to the appropriate method. |
CallOption[] |
getCallOptions()
Gets the current
CallOption as an array; usually used as an
argument in FlightSqlClient methods. |
static void |
main(String[] args) |
public final List<CallOption> callOptions
public final BufferAllocator allocator
public FlightSqlClient flightSqlClient
public FlightSqlClientDemoApp(BufferAllocator bufferAllocator)
public CallOption[] getCallOptions()
CallOption
as an array; usually used as an
argument in FlightSqlClient
methods.CallOption
array.public void executeApp(org.apache.commons.cli.CommandLine cmd) throws Exception
createFlightSqlClient(String, int)
in order to create a FlightSqlClient
to be used in future calls,
and then calls executeCommand(CommandLine)
to execute the command parsed at execution.cmd
- parsed CommandLine
; often the result of DefaultParser.parse(Options, String[])
.Exception
public void executeCommand(org.apache.commons.cli.CommandLine cmd) throws Exception
command
" CLI argument and redirects to the appropriate method.cmd
- parsed CommandLine
; often the result of
DefaultParser.parse(Options, String[])
.Exception
public void createFlightSqlClient(String host, int port)
FlightSqlClient
to be used with the example methods.host
- client's hostname.port
- client's port.public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2023 The Apache Software Foundation. All rights reserved.