Package org.smtlib

Class Driver

java.lang.Object
org.smtlib.Driver

public class Driver extends Object
The Driver class is a client that can send commands to the SMT application acting as a server.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<String>
    The commands as specified on the command-line
    protected int
    The port to which to send commands (set as a command-line option)
    protected boolean
    If true, do not echo 'success' responses (unless verbose is enabled)
    protected boolean
    Whether to start a service process from this process
    protected boolean
    If true, verbose, debugging information is emitted by the application (set as a command-line option)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    exec(String[] args)
    The non-static entry point to the application
    static void
    main(String[] args)
    The main entry point to the application
    protected int
    Sets the fields of the class according to the command-line
    int
    Sends the options and commands to the port; returns the exit code corresponding to the response from the last command.
    void
    Prints out the usage information

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • port

      protected int port
      The port to which to send commands (set as a command-line option)
    • verbose

      protected boolean verbose
      If true, verbose, debugging information is emitted by the application (set as a command-line option)
    • quiet

      protected boolean quiet
      If true, do not echo 'success' responses (unless verbose is enabled)
    • start

      protected boolean start
      Whether to start a service process from this process
    • commands

      protected List<String> commands
      The commands as specified on the command-line
  • Constructor Details

    • Driver

      public Driver()
  • Method Details

    • main

      public static void main(String[] args)
      The main entry point to the application
      Parameters:
      args - the command-line arguments
    • exec

      public int exec(String[] args)
      The non-static entry point to the application
      Parameters:
      args - the command-line arguments
      Returns:
      the exit code
    • processOptions

      protected int processOptions(String[] args)
      Sets the fields of the class according to the command-line
    • usage

      public void usage()
      Prints out the usage information
    • send

      public int send() throws IOException
      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