Package io.vertx.ext.shell.term
Interface Term
-
- All Superinterfaces:
Tty
public interface Term extends Tty
The terminal.- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the connection to terminal.Term
closeHandlerβ(Handler<Void> handler)
Set a handler that will be called when the terminal is closed.Term
echoβ(String text)
Echo some text in the terminal, escaped if necessary.Term
interruptHandlerβ(SignalHandler handler)
Set an interrupt signal handler on the term.long
lastAccessedTime()
void
readlineβ(String prompt, Handler<String> lineHandler)
Prompt the user a line of text.void
readlineβ(String prompt, Handler<String> lineHandler, Handler<Completion> completionHandler)
Prompt the user a line of text, providing a completion handler to handle user's completion.Term
resizehandlerβ(Handler<Void> handler)
Set a resize handler, the handler is called when the tty size changes.Term
setSessionβ(Session session)
Associate the term with a session.Term
stdinHandlerβ(Handler<String> handler)
Set a stream handler on the standard input to read the data.Term
suspendHandlerβ(SignalHandler handler)
Set a suspend signal handler on the term.Term
writeβ(String data)
Write data to the standard output.
-
-
-
Method Detail
-
resizehandler
Term resizehandlerβ(Handler<Void> handler)
Description copied from interface:Tty
Set a resize handler, the handler is called when the tty size changes.- Specified by:
resizehandler
in interfaceTty
- Parameters:
handler
- the resize handler- Returns:
- this object
-
stdinHandler
Term stdinHandlerβ(Handler<String> handler)
Description copied from interface:Tty
Set a stream handler on the standard input to read the data.- Specified by:
stdinHandler
in interfaceTty
- Parameters:
handler
- the standard input- Returns:
- this object
-
write
Term writeβ(String data)
Description copied from interface:Tty
Write data to the standard output.
-
lastAccessedTime
long lastAccessedTime()
- Returns:
- the last time this term received input
-
echo
Term echoβ(String text)
Echo some text in the terminal, escaped if necessary.- Parameters:
text
- the text to echo- Returns:
- a reference to this, so the API can be used fluently
-
setSession
Term setSessionβ(Session session)
Associate the term with a session.- Parameters:
session
- the session to set- Returns:
- a reference to this, so the API can be used fluently
-
interruptHandler
Term interruptHandlerβ(SignalHandler handler)
Set an interrupt signal handler on the term.- Parameters:
handler
- the interrupt handler- Returns:
- a reference to this, so the API can be used fluently
-
suspendHandler
Term suspendHandlerβ(SignalHandler handler)
Set a suspend signal handler on the term.- Parameters:
handler
- the suspend handler- Returns:
- a reference to this, so the API can be used fluently
-
readline
void readlineβ(String prompt, Handler<String> lineHandler)
Prompt the user a line of text.- Parameters:
prompt
- the displayed promptlineHandler
- the line handler called with the line
-
readline
void readlineβ(String prompt, Handler<String> lineHandler, Handler<Completion> completionHandler)
Prompt the user a line of text, providing a completion handler to handle user's completion.- Parameters:
prompt
- the displayed promptlineHandler
- the line handler called with the linecompletionHandler
- the completion handler
-
closeHandler
Term closeHandlerβ(Handler<Void> handler)
Set a handler that will be called when the terminal is closed.- Parameters:
handler
- the handler- Returns:
- a reference to this, so the API can be used fluently
-
close
void close()
Close the connection to terminal.
-
-