Package org.smtlib
Class Driver
java.lang.Object
org.smtlib.Driver
The Driver class is a client that can send commands to the SMT application acting as a server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe commands as specified on the command-lineprotected intThe port to which to send commands (set as a command-line option)protected booleanIf true, do not echo 'success' responses (unless verbose is enabled)protected booleanWhether to start a service process from this processprotected booleanIf true, verbose, debugging information is emitted by the application (set as a command-line option) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe non-static entry point to the applicationstatic voidThe main entry point to the applicationprotected intprocessOptions(String[] args) Sets the fields of the class according to the command-lineintsend()Sends the options and commands to the port; returns the exit code corresponding to the response from the last command.voidusage()Prints out the usage information
-
Field Details
-
port
protected int portThe port to which to send commands (set as a command-line option) -
verbose
protected boolean verboseIf true, verbose, debugging information is emitted by the application (set as a command-line option) -
quiet
protected boolean quietIf true, do not echo 'success' responses (unless verbose is enabled) -
start
protected boolean startWhether to start a service process from this process -
commands
The commands as specified on the command-line
-
-
Constructor Details
-
Driver
public Driver()
-
-
Method Details
-
main
The main entry point to the application- Parameters:
args- the command-line arguments
-
exec
The non-static entry point to the application- Parameters:
args- the command-line arguments- Returns:
- the exit code
-
processOptions
Sets the fields of the class according to the command-line -
usage
public void usage()Prints out the usage information -
send
Sends the options and commands to the port; returns the exit code corresponding to the response from the last command. Retries on ConnectException to tolerate slow server startup.- Throws:
IOException
-