Class ShellServer
- All Implemented Interfaces:
MutinyDelegate
registerTermServer(io.vertx.mutiny.ext.shell.term.TermServer)
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 createShell(io.vertx.mutiny.ext.shell.term.Term)
method can be used to create instance for testing purposes.
NOTE: This class has been automatically generated from the original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShellServer
(io.vertx.ext.shell.ShellServer delegate) ShellServer
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>
close()
Close the shell server, this is an asynchronous close.Blocking variant ofclose()
.void
Variant ofclose()
that ignores the result of the operation.static ShellServer
static ShellServer
createShell
(Term term) boolean
io.vertx.ext.shell.ShellServer
int
hashCode()
io.smallrye.mutiny.Uni<Void>
listen()
Start the shell service, this is an asynchronous start.Blocking variant oflisten()
.Variant oflisten()
that ignores the result of the operation.static ShellServer
newInstance
(io.vertx.ext.shell.ShellServer arg) registerCommandResolver
(CommandResolver resolver) registerTermServer
(TermServer termServer) void
shellHandler
(Consumer<Shell> shellHandler) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ShellServer
public ShellServer(io.vertx.ext.shell.ShellServer delegate) -
ShellServer
-
-
Method Details
-
getDelegate
public io.vertx.ext.shell.ShellServer getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- Parameters:
vertx
- the vertxoptions
- the options- Returns:
- the created shell server
-
create
- Parameters:
vertx
- the vertx- Returns:
- the created shell server
-
registerCommandResolver
- Parameters:
resolver
- the resolver- Returns:
- a reference to this, so the API can be used fluently
-
registerTermServer
- Parameters:
termServer
- the term server to add- Returns:
- a reference to this, so the API can be used fluently
-
createShell
- Parameters:
term
- the shell associated terminal- Returns:
- the created shell
-
createShell
- Returns:
- the created shell
-
listen
Start the shell service, this is an asynchronous start.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
listenAndAwait
Blocking variant oflisten()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
listenAndForget
Variant oflisten()
that ignores the result of the operation.This method subscribes on the result of
listen()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromlisten()
but you don't need to compose it with other operations.- Returns:
- the instance of ShellServer to chain method calls.
-
close
Close the shell server, this is an asynchronous close.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget() -
shellHandler
- Parameters:
shellHandler
- handler for getting notified when the server creates a new shell.
-
newInstance
-