Package io.permazen.cli
Class PermazenShell
java.lang.Object
org.dellroad.jct.core.simple.SimpleCommandSupport
org.dellroad.jct.core.simple.SimpleShell
io.permazen.cli.PermazenShell
- All Implemented Interfaces:
org.dellroad.jct.core.Shell
public class PermazenShell
extends org.dellroad.jct.core.simple.SimpleShell
A
ShellSession
that with an associated Permazen database.-
Nested Class Summary
Nested classes/interfaces inherited from class org.dellroad.jct.core.simple.SimpleShell
org.dellroad.jct.core.simple.SimpleShell.Session, org.dellroad.jct.core.simple.SimpleShell.SimpleCompleter
Nested classes/interfaces inherited from class org.dellroad.jct.core.simple.SimpleCommandSupport
org.dellroad.jct.core.simple.SimpleCommandSupport.FoundCommand
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Database
protected final KVDatabase
protected final Permazen
Fields inherited from class org.dellroad.jct.core.simple.SimpleCommandSupport
commandBundles, commandLineParser
-
Constructor Summary
ConstructorDescriptionPermazenShell
(KVDatabase kvdb) PermazenShell
(KVDatabase kvdb, Database db, Permazen pdb) General constructor.PermazenShell
(Permazen pdb) -
Method Summary
Modifier and TypeMethodDescriptionprotected PermazenShellSession
createPermazenShellSession
(org.dellroad.jct.core.ShellRequest request, org.jline.reader.LineReader reader) protected Session
createSession
(PermazenShellSession shellSession) newShellSession
(org.dellroad.jct.core.ShellRequest request) final PermazenShellSession
newShellSession
(org.dellroad.jct.core.ShellRequest request, org.jline.reader.LineReader reader) Methods inherited from class org.dellroad.jct.core.simple.SimpleShell
buildLineReader, createLineReaderBuilder, getGreeting
Methods inherited from class org.dellroad.jct.core.simple.SimpleCommandSupport
buildCommandMap, findCommand, findCommand, findCommand, getCommandBundles, getCommandLineParser, setCommandLineParser
-
Field Details
-
kvdb
-
db
-
pdb
-
-
Constructor Details
-
PermazenShell
-
PermazenShell
-
PermazenShell
-
PermazenShell
General constructor.Exactly one of the three parameters must be non-null.
- Parameters:
kvdb
- key/value databasedb
- core API databasepdb
- Java database- Throws:
IllegalArgumentException
- if not exactly one parameter is non-null
-
-
Method Details
-
newShellSession
public PermazenShellSession newShellSession(org.dellroad.jct.core.ShellRequest request) throws IOException - Specified by:
newShellSession
in interfaceorg.dellroad.jct.core.Shell
- Overrides:
newShellSession
in classorg.dellroad.jct.core.simple.SimpleShell
- Throws:
IOException
-
newShellSession
public final PermazenShellSession newShellSession(org.dellroad.jct.core.ShellRequest request, org.jline.reader.LineReader reader) throws IOException - Overrides:
newShellSession
in classorg.dellroad.jct.core.simple.SimpleShell
- Throws:
IOException
-
getNormalPrompt
- Overrides:
getNormalPrompt
in classorg.dellroad.jct.core.simple.SimpleShell
-
getContinuationPrompt
- Overrides:
getContinuationPrompt
in classorg.dellroad.jct.core.simple.SimpleShell
-
createPermazenShellSession
protected PermazenShellSession createPermazenShellSession(org.dellroad.jct.core.ShellRequest request, org.jline.reader.LineReader reader) throws IOException - Throws:
IOException
-
createSession
-