public abstract class CLI extends Main
Modifier and Type | Field and Description |
---|---|
Context |
context
Database context.
|
protected OutputStream |
out
Output file for queries.
|
protected boolean |
verbose
Verbose mode.
|
Modifier | Constructor and Description |
---|---|
protected |
CLI(String[] args)
Constructor.
|
protected |
CLI(String[] args,
Context ctx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
execute(Command cmd,
boolean info)
Executes the specified command and optionally prints some information.
|
protected boolean |
execute(CommandParser parser)
Execute the commands from the given command parser.
|
protected void |
execute(String in)
Parses and executes the input string.
|
protected Session |
init()
Initializes and returns a session.
|
protected Session |
session()
Returns the session.
|
public final Context context
protected OutputStream out
protected boolean verbose
protected CLI(String[] args) throws IOException
args
- command-line argumentsIOException
- I/O exceptionprotected CLI(String[] args, Context ctx) throws IOException
args
- command-line argumentsctx
- database context or null
IOException
- I/O exceptionprotected final void execute(String in) throws IOException
in
- input commandsIOException
- database exceptionprotected final boolean execute(CommandParser parser) throws IOException
parser
- command parserfalse
if the exit command was sentIOException
- database exceptionprotected final void execute(Command cmd, boolean info) throws IOException
cmd
- command to be runinfo
- verbose flagIOException
- I/O exceptionprotected final Session session() throws IOException
IOException
- I/O exceptionprotected Session init() throws IOException
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.