class ShellServer extends AnyRef
The shell server.
A shell server is associated with a collection of : the io.vertx.scala.ext.shell.ShellServer#registerTermServer method registers a term server. Term servers life cycle are managed by this server.
When a receives an incoming connection, a instance is created and associated with this connection.
The io.vertx.scala.ext.shell.ShellServer#createShell method can be used to create instance for testing purposes.
- Alphabetic
- By Inheritance
- ShellServer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ShellServer(_asJava: AnyRef)
Value Members
- def asJava: AnyRef
-
def
close(completionHandler: Handler[AsyncResult[Unit]]): Unit
Close the shell server, this is an asynchronous close.
Close the shell server, this is an asynchronous close. * @param completionHandler handler for getting notified when service is stopped
-
def
close(): Unit
Close the shell server, this is an asynchronous close.
-
def
closeFuture(): Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
createShell(): Shell
Create a new shell, the returned shell should be closed explicitely.
Create a new shell, the returned shell should be closed explicitely. * @return the created shell
-
def
createShell(term: Term): Shell
Create a new shell, the returned shell should be closed explicitely.
Create a new shell, the returned shell should be closed explicitely. * @param term the shell associated terminal
- returns
the created shell
-
def
listen(listenHandler: Handler[AsyncResult[Unit]]): ShellServer
Start the shell service, this is an asynchronous start.
Start the shell service, this is an asynchronous start. * @param listenHandler handler for getting notified when service is started
-
def
listen(): ShellServer
Start the shell service, this is an asynchronous start.
-
def
listenFuture(): Future[Unit]
Like listen but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
registerCommandResolver(resolver: CommandResolver): ShellServer
Register a command resolver for this server.
Register a command resolver for this server. * @param resolver the resolver
- returns
a reference to this, so the API can be used fluently
-
def
registerTermServer(termServer: TermServer): ShellServer
Register a term server to this shell server, the term server lifecycle methods are managed by this shell server.
Register a term server to this shell server, the term server lifecycle methods are managed by this shell server. * @param termServer the term server to add
- returns
a reference to this, so the API can be used fluently
-
def
shellHandler(shellHandler: Handler[Shell]): Unit
Called when a new shell is created.
Called when a new shell is created. Can be used to prepopulate the shell session with objects or set the prompt. * @param shellHandler handler for getting notified when the server creates a new shell.