Package gda.jython.server.shell
Class JythonShell
java.lang.Object
gda.jython.server.shell.JythonShell
- All Implemented Interfaces:
IScanDataPointObserver,Terminal,gda.observable.IObserver,Closeable,AutoCloseable
JythonShell provides the REPL for interacting with the GDA server.
It offers code completion and persistent history.
It has no knowledge of the connection type
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringWhether to show the startupOutput when a user first opens the shell -
Constructor Summary
ConstructorsConstructorDescriptionJythonShell(org.jline.terminal.Terminal term) JythonShell(org.jline.terminal.Terminal term, Map<String, String> env) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Unsubscribe this shell from receivingIScanDataPointand terminal output.voidrun()Run the actual REPL.toString()voidHandle updates fromJythonServerFacade.voidWrite to the terminalvoidwriteInput(TerminalInput input)
-
Field Details
-
SSH_STARTUP_OUTPUT_PROPERTY
Whether to show the startupOutput when a user first opens the shell- See Also:
-
-
Constructor Details
-
Method Details
-
run
public void run()Run the actual REPL. Blocks while running and only returns when EOFException is reached -
close
public void close()Unsubscribe this shell from receivingIScanDataPointand terminal output.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
update
Handle updates fromJythonServerFacade. Most likelyIScanDataPoints- Specified by:
updatein interfacegda.observable.IObserver
-
write
Write to the terminalIf this instance is in the process of reading a new line when the output is being printed, clear the prompt line first, then print the output, then restore the prompt. This prevents half completed commands being disrupted by output from other terminals.
-
writeInput
- Specified by:
writeInputin interfaceTerminal
-
toString
-