Class Command

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Command.Type
      Commands are either Data-Definition Language (DDL), Data-Manipulation Language (DML), or utility commands.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Command.Type cmdType
      The type of this command.
      protected java.io.PrintStream out
      This is the output stream for the current session, so that command output goes to the appropriate client.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Command​(Command.Type cmdType)
      Create a new command instance, of the specified command-type.
    • Field Detail

      • cmdType

        private Command.Type cmdType
        The type of this command.
      • out

        protected java.io.PrintStream out
        This is the output stream for the current session, so that command output goes to the appropriate client.
    • Constructor Detail

      • Command

        protected Command​(Command.Type cmdType)
        Create a new command instance, of the specified command-type. The constructor is protected, but that is redundant with the fact that the class is abstract anyways, so this class cannot be constructed directly.
        Parameters:
        cmdType - the general category of command
    • Method Detail

      • getCommandType

        public Command.Type getCommandType()
        Returns the general type or category of this command.