The shell server.
A shell server is associated with a collection of : the 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 ShellServer.createShell method can be used to create instance for testing purposes.Constructor and description |
---|
ShellServer
(java.lang.Object delegate) |
Type | Name and description |
---|---|
void |
close() Close the shell server, this is an asynchronous close. |
void |
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler) Close the shell server, this is an asynchronous close. |
static ShellServer |
create(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> options) Create a new shell server with default options. |
static ShellServer |
create(Vertx vertx) Create a new shell server with specific options. |
Shell |
createShell(Term term) Create a new shell, the returned shell should be closed explicitely. |
Shell |
createShell() Create a new shell, the returned shell should be closed explicitely. |
java.lang.Object |
getDelegate() |
ShellServer |
listen() Start the shell service, this is an asynchronous start. |
ShellServer |
listen(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> listenHandler) Start the shell service, this is an asynchronous start. |
ShellServer |
registerCommandResolver(CommandResolver resolver) Register a command resolver for this server. |
ShellServer |
registerTermServer(TermServer termServer) Register a term server to this shell server, the term server lifecycle methods are managed by this shell server. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Close the shell server, this is an asynchronous close.
Close the shell server, this is an asynchronous close.
completionHandler
- handler for getting notified when service is stoppedCreate a new shell server with default options.
vertx
- the vertxoptions
- the options (see ShellServerOptions)Create a new shell server with specific options.
vertx
- the vertxCreate a new shell, the returned shell should be closed explicitely.
term
- the shell associated terminalCreate a new shell, the returned shell should be closed explicitely.
Start the shell service, this is an asynchronous start.
Start the shell service, this is an asynchronous start.
listenHandler
- handler for getting notified when service is startedRegister a command resolver for this server.
resolver
- the resolverRegister a term server to this shell server, the term server lifecycle methods are managed by this shell server.
termServer
- the term server to add