Uses of Interface
io.vertx.core.Future
-
-
Uses of Future in io.vertx.core
Subinterfaces of Future in io.vertx.core Modifier and Type Interface Description interfaceCompositeFutureThe composite future wraps a list offutures, it is useful when several futures needs to be coordinated.interfaceTimerA timer task that can be used as a future.Methods in io.vertx.core that return Future Modifier and Type Method Description default Future<T>Future. andThen(Completable<? super T> handler)Invokes the givenhandlerupon completion.default Future<T>Future. andThen(Handler<AsyncResult<T>> handler)Invokes the givenhandlerupon completion.Future<Vertx>VertxBuilder. buildClustered()Creates a clustered instance.Future<Void>Vertx. close()Stop the Vertx instance and release any resources held by it.Future<Void>WorkerExecutor. close()Close the executor.static Future<Vertx>Vertx. clusteredVertx(VertxOptions options)Creates a clustered instance using the specified options.default <U> Future<U>Future. compose(Function<? super T,Future<U>> mapper)Compose this future with amapperfunction.<U> Future<U>Future. compose(Function<? super T,Future<U>> successMapper, Function<Throwable,Future<U>> failureMapper)Compose this future with asuccessMapperandfailureMapperfunctions.Future<?>AbstractVerticle. deploy(Context context)Future<?>Deployable. deploy(Context context)Start the deployable.Future<?>VerticleBase. deploy(Context context)default Future<String>Vertx. deployVerticle(Deployable verticle)Deploy a verticle instance that you have created yourself.default Future<String>Vertx. deployVerticle(Deployable verticle, DeploymentOptions options)LikeVertx.deployVerticle(Deployable)butDeploymentOptionsare provided to configure the deployment.Future<String>Vertx. deployVerticle(Class<? extends Deployable> verticleClass, DeploymentOptions options)LikeVertx.deployVerticle(Deployable, DeploymentOptions)butDeployableinstance is created by invoking the default constructor ofverticleClass.default Future<String>Vertx. deployVerticle(String name)Deploy a verticle instance given a name.Future<String>Vertx. deployVerticle(String name, DeploymentOptions options)LikeVertx.deployVerticle(Deployable)butDeploymentOptionsare provided to configure the deployment.Future<String>Vertx. deployVerticle(Supplier<? extends Deployable> supplier, DeploymentOptions options)LikeVertx.deployVerticle(Deployable, DeploymentOptions)butDeployableinstance is created by invoking theverticleSupplier.<U> Future<T>Future. eventually(Supplier<Future<U>> mapper)Compose this future with amapperthat will be always be called.default <T> Future<T>Context. executeBlocking(Callable<T> blockingCodeHandler)InvokeContext.executeBlocking(Callable, boolean)with order = true.<T> Future<T>Context. executeBlocking(Callable<T> blockingCodeHandler, boolean ordered)Safely execute some blocking code.default <T> Future<T>Vertx. executeBlocking(Callable<T> blockingCodeHandler)LikeVertx.executeBlocking(Callable, boolean)called with ordered = true.default <T> Future<T>Vertx. executeBlocking(Callable<T> blockingCodeHandler, boolean ordered)Safely execute some blocking code.default <T> Future<T>WorkerExecutor. executeBlocking(Callable<T> blockingCodeHandler)LikeWorkerExecutor.executeBlocking(Callable, boolean)called with ordered = true.<T> Future<T>WorkerExecutor. executeBlocking(Callable<T> blockingCodeHandler, boolean ordered)Safely execute some blocking code.Future<T>Future. expecting(Expectation<? super T> expectation)Guard the control flow of this future with an expectation.static <T> Future<T>Future. failedFuture(String failureMessage)Create a failed future with the specified failure message.static <T> Future<T>Future. failedFuture(Throwable t)Create a failed future with the specified failure cause.default <U> Future<U>Future. flatMap(Function<? super T,Future<U>> mapper)Alias forcompose(Function).static <T> Future<T>Future. fromCompletionStage(CompletionStage<T> completionStage)Bridges aCompletionStageobject to a Vert.x future instance.static <T> Future<T>Future. fromCompletionStage(CompletionStage<T> completionStage, Context context)Bridges aCompletionStageobject to a Vert.x future instance.static <T> Future<T>Future. future(Handler<Promise<T>> handler)Create a promise and pass it to thehandler, and then returns this future's promise.Future<T>Promise. future()<U> Future<U>Future. map(Function<? super T,U> mapper)Apply amapperfunction on this future.<V> Future<V>Future. map(V value)Map the result of a future to a specificvalue.default <V> Future<V>Future. mapEmpty()Map the result of a future tonull.default Future<T>Future. onComplete(Completable<? super T> handler)Add handlers to be notified on succeeded result and failed result.default Future<T>Future. onComplete(Handler<? super T> successHandler, Handler<? super Throwable> failureHandler)Add handlers to be notified on succeeded result and failed result.Future<T>Future. onComplete(Handler<AsyncResult<T>> handler)Add a handler to be notified of the result.default Future<T>Future. onFailure(Handler<? super Throwable> handler)Add a handler to be notified of the failed result.default Future<T>Future. onSuccess(Handler<? super T> handler)Add a handler to be notified of the succeeded result.Future<T>Future. otherwise(Function<Throwable,T> mapper)Apply amapperfunction on this future.Future<T>Future. otherwise(T value)Map the failure of a future to a specificvalue.default Future<T>Future. otherwiseEmpty()Map the failure of a future tonull.default Future<T>Future. recover(Function<Throwable,Future<T>> mapper)Handles a failure of this Future by returning the result of another Future.Future<?>VerticleBase. start()Start the verticle.Future<?>VerticleBase. stop()Stop the verticle.static <T> Future<T>Future. succeededFuture()Create a succeeded future with a null resultstatic <T> Future<T>Future. succeededFuture(T result)Created a succeeded future with the specified result.Future<T>Future. timeout(long delay, TimeUnit unit)Returns a future succeeded or failed with the outcome of this future when it happens before the timeout fires.default <U> Future<U>Future. transform(BiFunction<? super T,? super Throwable,Future<U>> mapper)Transform this future with amapperfunction.<U> Future<U>Future. transform(Function<AsyncResult<T>,Future<U>> mapper)Transform this future with amapperfunction.Future<?>AbstractVerticle. undeploy(Context context)default Future<?>Deployable. undeploy(Context context)Stop the deployable.Future<?>VerticleBase. undeploy(Context context)Future<Void>Vertx. undeploy(String deploymentID)Undeploy a verticle deployment.Methods in io.vertx.core with parameters of type Future Modifier and Type Method Description static CompositeFutureFuture. all(Future<?> f1, Future<?> f2)Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.static CompositeFutureFuture. all(Future<?> f1, Future<?> f2, Future<?> f3)Likeall(Future, Future)but with 3 futures.static CompositeFutureFuture. all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4)Likeall(Future, Future)but with 4 futures.static CompositeFutureFuture. all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5)Likeall(Future, Future)but with 5 futures.static CompositeFutureFuture. all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5, Future<?> f6)Likeall(Future, Future)but with 6 futures.static CompositeFutureFuture. any(Future<?> f1, Future<?> f2)Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.static CompositeFutureFuture. any(Future<?> f1, Future<?> f2, Future<?> f3)Likeany(Future, Future)but with 3 futures.static CompositeFutureFuture. any(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4)Likeany(Future, Future)but with 4 futures.static CompositeFutureFuture. any(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5)Likeany(Future, Future)but with 5 futures.static CompositeFutureFuture. any(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5, Future<?> f6)Likeany(Future, Future)but with 6 futures.static <T> TFuture. await(Future<T> future)Callsawait()onfuture.static CompositeFutureFuture. join(Future<?> f1, Future<?> f2)Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.static CompositeFutureFuture. join(Future<?> f1, Future<?> f2, Future<?> f3)Likejoin(Future, Future)but with 3 futures.static CompositeFutureFuture. join(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4)Likejoin(Future, Future)but with 4 futures.static CompositeFutureFuture. join(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5)Likejoin(Future, Future)but with 5 futures.static CompositeFutureFuture. join(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5, Future<?> f6)Likejoin(Future, Future)but with 6 futures.Method parameters in io.vertx.core with type arguments of type Future Modifier and Type Method Description static <T> CompositeFutureFuture. all(List<? extends Future<?>> futures)Likeall(Future, Future)but with a list of futures.static CompositeFutureFuture. any(List<? extends Future<?>> futures)Likeany(Future, Future)but with a list of futures.default <U> Future<U>Future. compose(Function<? super T,Future<U>> mapper)Compose this future with amapperfunction.<U> Future<U>Future. compose(Function<? super T,Future<U>> successMapper, Function<Throwable,Future<U>> failureMapper)Compose this future with asuccessMapperandfailureMapperfunctions.<U> Future<T>Future. eventually(Supplier<Future<U>> mapper)Compose this future with amapperthat will be always be called.default <U> Future<U>Future. flatMap(Function<? super T,Future<U>> mapper)Alias forcompose(Function).static CompositeFutureFuture. join(List<? extends Future<?>> futures)Likejoin(Future, Future)but with a list of futures.default Future<T>Future. recover(Function<Throwable,Future<T>> mapper)Handles a failure of this Future by returning the result of another Future.default <U> Future<U>Future. transform(BiFunction<? super T,? super Throwable,Future<U>> mapper)Transform this future with amapperfunction.<U> Future<U>Future. transform(Function<AsyncResult<T>,Future<U>> mapper)Transform this future with amapperfunction. -
Uses of Future in io.vertx.core.datagram
Methods in io.vertx.core.datagram that return Future Modifier and Type Method Description Future<Void>DatagramSocket. blockMulticastGroup(String multicastAddress, String sourceToBlock)Block the given address for the given multicast address and notifies theHandleronce the operation completes.Future<Void>DatagramSocket. blockMulticastGroup(String multicastAddress, String networkInterface, String sourceToBlock)Block the given address for the given multicast address on the given network interface and notifies theHandleronce the operation completes.Future<Void>DatagramSocket. close()Closes theDatagramSocketimplementation asynchronous and notifies the handler once done.Future<DatagramSocket>DatagramSocket. listen(int port, String host)Start listening on the given port and host.Future<Void>DatagramSocket. listenMulticastGroup(String multicastAddress)Joins a multicast group and listens for packets send to it.Future<Void>DatagramSocket. listenMulticastGroup(String multicastAddress, String networkInterface, String source)Joins a multicast group and listens for packets send to it on the given network interface.Future<Void>DatagramSocket. send(Buffer packet, int port, String host)Write the givenBufferto theSocketAddress.Future<Void>DatagramSocket. send(String str, int port, String host)Write the givenStringto theSocketAddressusing UTF8 encoding.Future<Void>DatagramSocket. send(String str, String enc, int port, String host)Write the givenStringto theSocketAddressusing the given encoding.Future<Void>DatagramSocket. unlistenMulticastGroup(String multicastAddress)Leaves a multicast group and stops listening for packets send to it.Future<Void>DatagramSocket. unlistenMulticastGroup(String multicastAddress, String networkInterface, String source)Leaves a multicast group and stops listening for packets send to it on the given network interface. -
Uses of Future in io.vertx.core.dns
Methods in io.vertx.core.dns that return Future Modifier and Type Method Description Future<Void>DnsClient. close()Close the client.Future<String>DnsClient. lookup(String name)Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.Future<String>DnsClient. lookup4(String name)Try to lookup the A (ipv4) record for the given name.Future<String>DnsClient. lookup6(String name)Try to lookup the AAAA (ipv6) record for the given name.Future<List<String>>DnsClient. resolveA(String name)Try to resolve all A (ipv4) records for the given name.Future<List<String>>DnsClient. resolveAAAA(String name)Try to resolve all AAAA (ipv6) records for the given name.Future<List<String>>DnsClient. resolveCNAME(String name)Try to resolve the CNAME record for the given name.Future<List<MxRecord>>DnsClient. resolveMX(String name)Try to resolve the MX records for the given name.Future<List<String>>DnsClient. resolveNS(String name)Try to resolve the NS records for the given name.Future<String>DnsClient. resolvePTR(String name)Try to resolve the PTR record for the given name.Future<List<SrvRecord>>DnsClient. resolveSRV(String name)Try to resolve the SRV records for the given name.Future<List<String>>DnsClient. resolveTXT(String name)Try to resolve the TXT records for the given name.default Future<String>DnsClient. reverseLookup(String ipaddress)Try to do a reverse lookup of an IP address. -
Uses of Future in io.vertx.core.eventbus
Methods in io.vertx.core.eventbus that return Future Modifier and Type Method Description Future<Void>MessageProducer. close()Closes the producer, this method should be called when the message producer is not used anymore.Future<Void>MessageConsumer. completion()default <R> Future<Message<R>>Message. replyAndRequest(Object message)Reply to this message, specifying areplyHandlerfor the reply - i.e.<R> Future<Message<R>>Message. replyAndRequest(Object message, DeliveryOptions options)LikeMessage.replyAndRequest(Object)but specifyingoptionsthat can be used to configure the delivery.default <T> Future<Message<T>>EventBus. request(String address, Object message)Sends a message and specify areplyHandlerthat will be called if the recipient subsequently replies to the message.<T> Future<Message<T>>EventBus. request(String address, Object message, DeliveryOptions options)LikeEventBus.request(String, Object)but specifyingoptionsthat can be used to configure the delivery.Future<Void>MessageConsumer. unregister()Unregisters the handler which created this registrationFuture<Void>MessageProducer. write(T body)Write a message to the event-bus, either sending or publishing. -
Uses of Future in io.vertx.core.file
Methods in io.vertx.core.file that return Future Modifier and Type Method Description Future<Void>FileSystem. chmod(String path, String perms)Change the permissions on the file represented bypathtoperms, asynchronously.Future<Void>FileSystem. chmodRecursive(String path, String perms, String dirPerms)Change the permissions on the file represented bypathtoperms, asynchronously.Future<Void>FileSystem. chown(String path, String user, String group)Change the ownership on the file represented bypathtouserand {code group}, asynchronously.Future<Void>AsyncFile. close()Close the file.Future<Void>FileSystem. copy(String from, String to)Copy a file from the pathfromto pathto, asynchronously.Future<Void>FileSystem. copy(String from, String to, CopyOptions options)Copy a file from the pathfromto pathto, asynchronously.Future<Void>FileSystem. copyRecursive(String from, String to, boolean recursive)Copy a file from the pathfromto pathto, asynchronously.Future<Void>FileSystem. createFile(String path)Creates an empty file with the specifiedpath, asynchronously.Future<Void>FileSystem. createFile(String path, String perms)Creates an empty file with the specifiedpathand permissionsperms, asynchronously.Future<String>FileSystem. createTempDirectory(String prefix)Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.Future<String>FileSystem. createTempDirectory(String prefix, String perms)Creates a new directory in the default temporary-file directory, using the given prefix to generate its name, asynchronously.Future<String>FileSystem. createTempDirectory(String dir, String prefix, String perms)Creates a new directory in the directory provided by the pathpath, using the given prefix to generate its name, asynchronously.Future<String>FileSystem. createTempFile(String prefix, String suffix)Creates a new file in the default temporary-file directory, using the given prefix and suffix to generate its name, asynchronously.Future<String>FileSystem. createTempFile(String prefix, String suffix, String perms)Creates a new file in the directory provided by the pathdir, using the given prefix and suffix to generate its name, asynchronously.Future<String>FileSystem. createTempFile(String dir, String prefix, String suffix, String perms)Creates a new file in the directory provided by the pathdir, using the given prefix and suffix to generate its name, asynchronously.Future<Void>FileSystem. delete(String path)Deletes the file represented by the specifiedpath, asynchronously.Future<Void>FileSystem. deleteRecursive(String path)Deletes the file represented by the specifiedpath, asynchronously.Future<Boolean>FileSystem. exists(String path)Determines whether the file as specified by the pathpathexists, asynchronously.Future<Void>AsyncFile. flush()Flush any writes made to this file to underlying persistent storage.Future<FileSystemProps>FileSystem. fsProps(String path)Returns properties of the file-system being used by the specifiedpath, asynchronously.Future<Boolean>AsyncFileLock. isValid()A lock remains valid until it is released or the file correspondingAsyncFileis closed.Future<Void>FileSystem. link(String link, String existing)Create a hard link on the file system fromlinktoexisting, asynchronously.default Future<AsyncFileLock>AsyncFile. lock()Acquire a non-shared lock on the entire file.Future<AsyncFileLock>AsyncFile. lock(long position, long size, boolean shared)Acquire a lock on a portion of this file.Future<FileProps>FileSystem. lprops(String path)Obtain properties for the link represented bypath, asynchronously.Future<Void>FileSystem. mkdir(String path)Create the directory represented bypath, asynchronously.Future<Void>FileSystem. mkdir(String path, String perms)Create the directory represented bypath, asynchronously.Future<Void>FileSystem. mkdirs(String path)Create the directory represented bypathand any non existent parents, asynchronously.Future<Void>FileSystem. mkdirs(String path, String perms)Create the directory represented bypathand any non existent parents, asynchronously.Future<Void>FileSystem. move(String from, String to)Move a file from the pathfromto pathto, asynchronously.Future<Void>FileSystem. move(String from, String to, CopyOptions options)Move a file from the pathfromto pathto, asynchronously.Future<AsyncFile>FileSystem. open(String path, OpenOptions options)Open the file represented bypath, asynchronously.Future<FileProps>FileSystem. props(String path)Obtain properties for the file represented bypath, asynchronously.Future<Buffer>AsyncFile. read(Buffer buffer, int offset, long position, int length)Readslengthbytes of data from the file at positionpositionin the file, asynchronously.Future<List<String>>FileSystem. readDir(String path)Read the contents of the directory specified bypath, asynchronously.Future<List<String>>FileSystem. readDir(String path, String filter)Read the contents of the directory specified bypath, asynchronously.Future<Buffer>FileSystem. readFile(String path)Reads the entire file as represented by the pathpathas aBuffer, asynchronously.Future<String>FileSystem. readSymlink(String link)Returns the path representing the file that the symbolic link specified bylinkpoints to, asynchronously.Future<Void>AsyncFileLock. release()Releases this lock;Future<Long>AsyncFile. size()Future<Void>FileSystem. symlink(String link, String existing)Create a symbolic link on the file system fromlinktoexisting, asynchronously.Future<Void>FileSystem. truncate(String path, long len)Truncate the file represented bypathto lengthlenin bytes, asynchronously.Future<Void>FileSystem. unlink(String link)Unlinks the link on the file system represented by the pathlink, asynchronously.default <T> Future<T>AsyncFile. withLock(long position, long size, boolean shared, Supplier<Future<T>> block)Acquire a lock on a portion of this file.default <T> Future<T>AsyncFile. withLock(Supplier<Future<T>> block)Acquire a non-shared lock on the entire file.Future<Void>AsyncFile. write(Buffer buffer, long position)Write aBufferto the file at positionpositionin the file, asynchronously.Future<Void>FileSystem. writeFile(String path, Buffer data)Creates the file, and writes the specifiedBuffer datato the file represented by the pathpath, asynchronously.Method parameters in io.vertx.core.file with type arguments of type Future Modifier and Type Method Description default <T> Future<T>AsyncFile. withLock(long position, long size, boolean shared, Supplier<Future<T>> block)Acquire a lock on a portion of this file.default <T> Future<T>AsyncFile. withLock(Supplier<Future<T>> block)Acquire a non-shared lock on the entire file. -
Uses of Future in io.vertx.core.http
Fields in io.vertx.core.http with type parameters of type Future Modifier and Type Field Description static Function<HttpClientResponse,Future<RequestOptions>>HttpClientAgent. DEFAULT_REDIRECT_HANDLERConstant containing the default redirect handler of used by the client.Methods in io.vertx.core.http that return Future Modifier and Type Method Description Future<ServerWebSocket>ServerWebSocketHandshake. accept()Accept the WebSocket and terminate the WebSocket handshake.Future<Buffer>HttpClientResponse. body()Convenience method for receiving the entire request body in one piece.Future<Buffer>HttpServerRequest. body()Convenience method for receiving the entire request body in one piece.default Future<Void>HttpClient. close()Close immediately (shutdown(0, TimeUnit.SECONDS).default Future<Void>HttpClientConnection. close()default Future<Void>HttpConnection. close()Close immediately (shutdown(0, TimeUnit.SECONDS).default Future<Void>HttpServer. close()Close the server.default Future<Void>ServerWebSocket. close()Close the WebSocket sending the default close frame.default Future<Void>WebSocketBase. close()Close the WebSocket sending the default close frame.default Future<Void>WebSocketBase. close(short statusCode)Close the WebSocket sending a close frame with specified status code.default Future<Void>WebSocketBase. close(short statusCode, String reason)Close sending a close frame with specified status code and reason.default Future<Void>WebSocketClient. close()Close immediately (shutdown(0, TimeUnit.SECONDS).default Future<WebSocket>ClientWebSocket. connect(int port, String host, String requestURI)Connect this WebSocket to the specified port, host and relative request URI.Future<WebSocket>ClientWebSocket. connect(WebSocketConnectOptions options)Connect this WebSocket with the specified options.default Future<WebSocket>ClientWebSocket. connect(String requestURI)Connect this WebSocket at the relative request URI using the default host and port.default Future<WebSocket>ClientWebSocket. connect(String host, String requestURI)Connect this WebSocket to the host and relative request URI and default port.Future<HttpClientConnection>HttpClientAgent. connect(HttpConnectOptions options)Connect to a remote HTTP server with the specificoptions, the connection is un-pooled and the management of the connection is left to the user.Future<HttpClientResponse>HttpClientRequest. connect()Create an HTTP tunnel to the server.default Future<WebSocket>WebSocketClient. connect(int port, String host, String requestURI)Connect a WebSocket to the specified port, host and relative request URI.Future<WebSocket>WebSocketClient. connect(WebSocketConnectOptions options)Connect a WebSocket with the specified options.default Future<WebSocket>WebSocketClient. connect(String requestURI)Connect a WebSocket to the default client port, default client host and specified, relative request URI.default Future<WebSocket>WebSocketClient. connect(String host, String requestURI)Connect a WebSocket to the default client port and specified host and relative request URI.Future<Void>HttpClientRequest. end()Ends the request.Future<Void>HttpClientRequest. end(Buffer chunk)Same asHttpClientRequest.end()but writes some data to the request body before ending.Future<Void>HttpClientRequest. end(String chunk)Same asHttpClientRequest.end(Buffer)but writes a String in UTF-8 encodingFuture<Void>HttpClientRequest. end(String chunk, String enc)Same asHttpClientRequest.end(Buffer)but writes a String with the specified encodingFuture<Void>HttpClientResponse. end()Returns a future signaling when the response has been fully received successfully or failed.Future<Void>HttpServerRequest. end()Returns a future signaling when the request has been fully received successfully or failed.Future<Void>HttpServerResponse. end()Ends the response.Future<Void>HttpServerResponse. end(Buffer chunk)Same asHttpServerResponse.end()but writes some data to the response body before ending.Future<Void>HttpServerResponse. end(String chunk)Same asHttpServerResponse.end(Buffer)but writes a String in UTF-8 encoding before ending the response.Future<Void>HttpServerResponse. end(String chunk, String enc)Same asHttpServerResponse.end(Buffer)but writes a String with the specified encoding before ending the response.Future<Void>WebSocketBase. end()Ends the stream.Future<HttpServer>HttpServer. listen()Tell the server to start listening.default Future<HttpServer>HttpServer. listen(int port)LikeHttpServer.listen(int, String)but the server will listen on host "0.0.0.0" and port specified here ignoring any value in theHttpServerOptionsthat was used when creating the server.default Future<HttpServer>HttpServer. listen(int port, String host)Tell the server to start listening.Future<HttpServer>HttpServer. listen(SocketAddress address)Tell the server to start listening on the given address supplying a handler that will be called when the server is actually listening (or has failed).Future<Buffer>HttpConnection. ping(Buffer data)Send a PING frame to the remote endpoint.default Future<HttpServerResponse>HttpServerResponse. push(HttpMethod method, HostAndPort authority, String path)LikeHttpServerResponse.push(HttpMethod, HostAndPort, String, MultiMap)with no headers.Future<HttpServerResponse>HttpServerResponse. push(HttpMethod method, HostAndPort authority, String path, MultiMap headers)Push a response to the client.default Future<HttpServerResponse>HttpServerResponse. push(HttpMethod method, String path)LikeHttpServerResponse.push(HttpMethod, HostAndPort, String, MultiMap)with the host copied from the current request.default Future<HttpServerResponse>HttpServerResponse. push(HttpMethod method, String path, MultiMap headers)LikeHttpServerResponse.push(HttpMethod, HostAndPort, String, MultiMap)with the host copied from the current request.default Future<Void>ServerWebSocketHandshake. reject()Reject the WebSocket.Future<Void>ServerWebSocketHandshake. reject(int status)LikeServerWebSocketHandshake.reject()but with astatus.default Future<HttpClientRequest>HttpClient. request()Create an HTTP request to send to the server with the default host and port of the client.default Future<HttpClientRequest>HttpClient. request(HttpMethod method, int port, String host, String requestURI)Create an HTTP request to send to the server at thehostandport.default Future<HttpClientRequest>HttpClient. request(HttpMethod method, String requestURI)Create an HTTP request to send to the server at the default host and port.default Future<HttpClientRequest>HttpClient. request(HttpMethod method, String host, String requestURI)Create an HTTP request to send to the server at thehostand default port.Future<HttpClientRequest>HttpClient. request(RequestOptions options)Create an HTTP request to send to the server.default Future<Void>HttpClientRequest. reset()Reset this stream with the error code0.Future<Void>HttpClientRequest. reset(long code)Reset this request:Future<Void>HttpClientRequest. reset(long code, Throwable cause)Reset this request:default Future<Void>HttpServerResponse. reset()Reset this HTTP/2 stream with the error code0.Future<Void>HttpServerResponse. reset(long code)Reset this response:Future<HttpClientResponse>HttpClientRequest. response()default Future<HttpClientResponse>HttpClientRequest. send()Send the request with an empty body.default Future<HttpClientResponse>HttpClientRequest. send(Buffer body)Send the request with a bufferbody.Future<HttpClientResponse>HttpClientRequest. send(ClientForm form)LikeHttpClientRequest.send()but with aform.default Future<HttpClientResponse>HttpClientRequest. send(ReadStream<Buffer> body)Send the request with a streambody.default Future<HttpClientResponse>HttpClientRequest. send(String body)Send the request with a stringbody.default Future<Void>HttpServerResponse. send()Send the request with an empty body.default Future<Void>HttpServerResponse. send(Buffer body)Send the request with a bufferbody.default Future<Void>HttpServerResponse. send(ReadStream<Buffer> body)Send the request with a streambody.default Future<Void>HttpServerResponse. send(String body)Send the request with a stringbody.default Future<Void>HttpServerResponse. sendFile(RandomAccessFile file)Same asHttpServerResponse.sendFile(FileChannel)withRandomAccessFiledefault Future<Void>HttpServerResponse. sendFile(RandomAccessFile file, long offset)default Future<Void>HttpServerResponse. sendFile(RandomAccessFile file, long offset, long length)default Future<Void>HttpServerResponse. sendFile(String filename)Send the request with a streambody.default Future<Void>HttpServerResponse. sendFile(String filename, long offset)Same asHttpServerResponse.sendFile(String, long, long)using length @code{Long.MAX_VALUE} which means until the end of the file.Future<Void>HttpServerResponse. sendFile(String filename, long offset, long length)Ask the OS to stream a file as specified byfilenamedirectly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system.default Future<Void>HttpServerResponse. sendFile(FileChannel channel)Same asHttpServerResponse.sendFile(FileChannel, long)using length @code{Long.MAX_VALUE} which means until the end of the file.default Future<Void>HttpServerResponse. sendFile(FileChannel channel, long offset)Same asHttpServerResponse.sendFile(FileChannel, long, long)using length @code{Long.MAX_VALUE} which means until the end of the file.Future<Void>HttpServerResponse. sendFile(FileChannel channel, long offset, long length)Ask the OS to stream a file as specified bychanneldirectly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system).Future<Void>HttpClientRequest. sendHead()Forces the head of the request to be written beforeHttpClientRequest.end()is called on the request or any data is written to it.default Future<Void>HttpClient. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>HttpClient. shutdown(long timeout, TimeUnit unit)Initiate the client shutdown sequence.default Future<Void>HttpClientConnection. shutdown()Future<Void>HttpClientConnection. shutdown(long timeout, TimeUnit unit)default Future<Void>HttpConnection. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>HttpConnection. shutdown(long timeout, TimeUnit unit)Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeoutthe connection will be closed.default Future<Void>HttpServer. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>HttpServer. shutdown(long timeout, TimeUnit unit)Initiate the server shutdown sequence.default Future<Void>WebSocketBase. shutdown()LikeWebSocketBase.shutdown(long, TimeUnit, short, String)with a 30 seconds timeout, the status code1000anullreason.default Future<Void>WebSocketBase. shutdown(long timeout, TimeUnit unit)CallsWebSocketBase.shutdown(long, TimeUnit, short, String)with the status code1000and anullreason.default Future<Void>WebSocketBase. shutdown(long timeout, TimeUnit unit, short statusCode)CallsWebSocketBase.shutdown(long, TimeUnit, short, String)with anullreason.Future<Void>WebSocketBase. shutdown(long timeout, TimeUnit unit, short statusCode, String reason)Initiate a graceful WebSocket shutdown, the shutdown handler is notified and shall close the WebSocket, otherwise after atimeoutthe WebSocket will be closed.default Future<Void>WebSocketBase. shutdown(short statusCode)LikeWebSocketBase.shutdown(long, TimeUnit, short, String)with a 30 seconds timeout and anullreason.default Future<Void>WebSocketBase. shutdown(short statusCode, String reason)LikeWebSocketBase.shutdown(long, TimeUnit, short, String)with a 30 seconds timeout.default Future<Void>WebSocketClient. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>WebSocketClient. shutdown(long timeout, TimeUnit unit)Initiate the client shutdown sequence.Future<Void>HttpServerFileUpload. streamToFileSystem(String filename)Stream the content of this upload to the given file on storage.Future<NetSocket>HttpServerRequest. toNetSocket()Establish a TCP tunnel with the client.Future<ServerWebSocket>HttpServerRequest. toWebSocket()Upgrade the connection of the current request to a WebSocket.Future<Void>HttpConnection. updateSettings(Http2Settings settings)Send to the remote endpoint an update of this endpoint settingsdefault Future<Boolean>HttpClientAgent. updateSSLOptions(ClientSSLOptions options)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>HttpClientAgent. updateSSLOptions(ClientSSLOptions options, boolean force)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.default Future<Boolean>HttpServer. updateSSLOptions(ServerSSLOptions options)Update the server with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>HttpServer. updateSSLOptions(ServerSSLOptions options, boolean force)Update the server with new SSLoptions, the update happens if the options object is valid and different from the existing options object.default Future<Boolean>WebSocketClient. updateSSLOptions(ClientSSLOptions options)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>WebSocketClient. updateSSLOptions(ClientSSLOptions options, boolean force)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>HttpServer. updateTrafficShapingOptions(TrafficShapingOptions options)Update the server with new trafficoptions, the update happens if the options object is valid and different from the existing options object.Future<Void>HttpClientRequest. write(String chunk)Write aStringto the request body, encoded as UTF-8.Future<Void>HttpClientRequest. write(String chunk, String enc)Write aStringto the request body, encoded using the encodingenc.Future<Void>HttpServerResponse. write(String chunk)Write aStringto the response body, encoded in UTF-8.Future<Void>HttpServerResponse. write(String chunk, String enc)Write aStringto the response body, encoded using the encodingenc.Future<Void>WebSocketBase. writeBinaryMessage(Buffer data)Writes a (potentially large) piece of binary data to the connection.Future<Void>HttpServerResponse. writeContinue()Used to write an interim 100 Continue response to signify that the client should send the rest of the request.Future<Void>HttpClientRequest. writeCustomFrame(int type, int flags, Buffer payload)Write an HTTP/2 frame to the request, allowing to extend the HTTP/2 protocol.default Future<Void>HttpClientRequest. writeCustomFrame(HttpFrame frame)LikeHttpClientRequest.writeCustomFrame(int, int, Buffer)but with anHttpFrame.Future<Void>HttpServerResponse. writeCustomFrame(int type, int flags, Buffer payload)Write an HTTP/2 frame to the response, allowing to extend the HTTP/2 protocol.default Future<Void>HttpServerResponse. writeCustomFrame(HttpFrame frame)LikeHttpServerResponse.writeCustomFrame(int, int, Buffer)but with anHttpFrame.Future<Void>HttpServerResponse. writeEarlyHints(MultiMap headers)Used to write an interim 103 Early Hints response to return some HTTP headers before the final HTTP message.Future<Void>WebSocketBase. writeFinalBinaryFrame(Buffer data)Write a final WebSocket binary frame to the connectionFuture<Void>WebSocketBase. writeFinalTextFrame(String text)Write a final WebSocket text frame to the connectionFuture<Void>WebSocketBase. writeFrame(WebSocketFrame frame)Write a WebSocket frame to the connectionFuture<Void>HttpServerResponse. writeHead()Send the response headers.Future<Void>WebSocketBase. writePing(Buffer data)Writes a ping frame to the connection.Future<Void>WebSocketBase. writePong(Buffer data)Writes a pong frame to the connection.Future<Void>WebSocketBase. writeTextMessage(String text)Writes a (potentially large) piece of text data to the connection.Method parameters in io.vertx.core.http with type arguments of type Future Modifier and Type Method Description HttpClientRequestHttpClientRequest. redirectHandler(Function<HttpClientResponse,Future<HttpClientRequest>> handler)HttpClientBuilderHttpClientBuilder. withRedirectHandler(Function<HttpClientResponse,Future<RequestOptions>> handler)Set a redirect handler for the http client. -
Uses of Future in io.vertx.core.net
Methods in io.vertx.core.net that return Future Modifier and Type Method Description default Future<Void>NetClient. close()Close immediately (shutdown(0, TimeUnit.SECONDS).default Future<Void>NetServer. close()Close the server.Future<Void>NetSocket. close()Close the socketFuture<NetSocket>NetClient. connect(int port, String host)Open a connection to a server at the specificportandhost.Future<NetSocket>NetClient. connect(int port, String host, String serverName)Open a connection to a server at the specificportandhost.Future<NetSocket>NetClient. connect(ConnectOptions connectOptions)Open a connection to a server at the specificconnectOptions.Future<NetSocket>NetClient. connect(SocketAddress remoteAddress)Open a connection to a server at the specificremoteAddress.Future<NetSocket>NetClient. connect(SocketAddress remoteAddress, String serverName)Open a connection to a server at the specificremoteAddress.Future<Void>NetSocket. end()CallsNetSocket.close()Future<NetServer>NetServer. listen()Start listening on the port and host as configured in theNetServerOptionsused when creating the server.default Future<NetServer>NetServer. listen(int port)Start listening on the specified port and host "0.0.0.0", ignoring port and host configured in theNetServerOptionsused when creating the server.default Future<NetServer>NetServer. listen(int port, String host)Start listening on the specified port and host, ignoring port and host configured in theNetServerOptionsused when creating the server.Future<NetServer>NetServer. listen(SocketAddress localAddress)Start listening on the specified local address, ignoring port and host configured in theNetServerOptionsused when creating the server.default Future<Void>NetSocket. sendFile(String filename)Tell the operating system to stream a file as specified byfilenamedirectly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system.default Future<Void>NetSocket. sendFile(String filename, long offset)Tell the operating system to stream a file as specified byfilenamedirectly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system.Future<Void>NetSocket. sendFile(String filename, long offset, long length)Tell the operating system to stream a file as specified byfilenamedirectly from disk to the outgoing connection, bypassing userspace altogether (where supported by the underlying operating system.default Future<Void>NetClient. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>NetClient. shutdown(long timeout, TimeUnit unit)Initiate the client shutdown sequence.default Future<Void>NetServer. shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<Void>NetServer. shutdown(long timeout, TimeUnit unit)Initiate the server shutdown sequence.default Future<Boolean>NetClient. updateSSLOptions(ClientSSLOptions options)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>NetClient. updateSSLOptions(ClientSSLOptions options, boolean force)Update the client with new SSLoptions, the update happens if the options object is valid and different from the existing options object.default Future<Boolean>NetServer. updateSSLOptions(ServerSSLOptions options)Update the server with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>NetServer. updateSSLOptions(ServerSSLOptions options, boolean force)Update the server with new SSLoptions, the update happens if the options object is valid and different from the existing options object.Future<Boolean>NetServer. updateTrafficShapingOptions(TrafficShapingOptions options)Update the server with new trafficoptions, the update happens if the options object is valid and different from the existing options object.default Future<Void>NetSocket. upgradeToSsl()LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)with the default SSL options, without indicating a server name, without an upgrade message.default Future<Void>NetSocket. upgradeToSsl(Buffer msg)LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)with the default SSL options and without indicating a server name.default Future<Void>NetSocket. upgradeToSsl(SSLOptions sslOptions)Upgrade channel to use SSL/TLS.default Future<Void>NetSocket. upgradeToSsl(SSLOptions sslOptions, Buffer msg)LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)without indicating a server namedefault Future<Void>NetSocket. upgradeToSsl(SSLOptions sslOptions, String serverName)LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)without an upgrade message.Future<Void>NetSocket. upgradeToSsl(SSLOptions sslOptions, String serverName, Buffer upgrade)Upgrade the channel to use SSL/TLS, in other words proceeds to the TLS handshake.default Future<Void>NetSocket. upgradeToSsl(String serverName)LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)with the default SSL options and without an update message.default Future<Void>NetSocket. upgradeToSsl(String serverName, Buffer msg)LikeNetSocket.upgradeToSsl(SSLOptions, String, Buffer)with the default SSL options.Future<Void>NetSocket. write(String str)Write aStringto the connection, encoded in UTF-8.Future<Void>NetSocket. write(String str, String enc)Write aStringto the connection, encoded using the encodingenc. -
Uses of Future in io.vertx.core.net.endpoint
Methods in io.vertx.core.net.endpoint that return Future Modifier and Type Method Description Future<Endpoint>EndpointResolver. resolveEndpoint(Address address)Resolver an endpoint for the specifiedaddress -
Uses of Future in io.vertx.core.shareddata
Methods in io.vertx.core.shareddata that return Future Modifier and Type Method Description Future<Long>Counter. addAndGet(long value)Add the value to the counter atomically and return the new countFuture<Void>AsyncMap. clear()Clear all entries in the mapFuture<Boolean>Counter. compareAndSet(long expected, long value)Set the counter to the specified value only if the current value is the expectec value.Future<Long>Counter. decrementAndGet()Decrement the counter atomically and return the new countFuture<Map<K,V>>AsyncMap. entries()Get the entries of the map, asynchronously.Future<V>AsyncMap. get(K k)Get a value from the map, asynchronously.Future<Long>Counter. get()Get the current value of the counterFuture<Long>Counter. getAndAdd(long value)Add the value to the counter atomically and return the value before the addFuture<Long>Counter. getAndIncrement()Increment the counter atomically and return the value before the increment.<K,V>
Future<AsyncMap<K,V>>SharedData. getAsyncMap(String name)Get theAsyncMapwith the specified name.<K,V>
Future<AsyncMap<K,V>>SharedData. getClusterWideMap(String name)Get the cluster wide map with the specified name.Future<Counter>SharedData. getCounter(String name)Get an asynchronous counter.<K,V>
Future<AsyncMap<K,V>>SharedData. getLocalAsyncMap(String name)Get theAsyncMapwith the specified name.Future<Counter>SharedData. getLocalCounter(String name)Get an asynchronous local counter.Future<Lock>SharedData. getLocalLock(String name)Get an asynchronous local lock with the specified name.Future<Lock>SharedData. getLocalLockWithTimeout(String name, long timeout)LikeSharedData.getLocalLock(String)but specifying a timeout.Future<Lock>SharedData. getLock(String name)Get an asynchronous lock with the specified name.Future<Lock>SharedData. getLockWithTimeout(String name, long timeout)LikeSharedData.getLock(String)but specifying a timeout.Future<Long>Counter. incrementAndGet()Increment the counter atomically and return the new countFuture<Set<K>>AsyncMap. keys()Get the keys of the map, asynchronously.Future<Void>AsyncMap. put(K k, V v)Put a value in the map, asynchronously.Future<Void>AsyncMap. put(K k, V v, long ttl)LikeAsyncMap.put(K, V)but specifying a time to live for the entry.Future<V>AsyncMap. putIfAbsent(K k, V v)Put the entry only if there is no entry with the key already present.Future<V>AsyncMap. putIfAbsent(K k, V v, long ttl)LinkAsyncMap.putIfAbsent(K, V)but specifying a time to live for the entry.Future<V>AsyncMap. remove(K k)Remove a value from the map, asynchronously.Future<Boolean>AsyncMap. removeIfPresent(K k, V v)Remove a value from the map, only if entry already exists with same value.Future<V>AsyncMap. replace(K k, V v)Replace the entry only if it is currently mapped to some valuedefault Future<V>AsyncMap. replace(K k, V v, long ttl)Replace the entry only if it is currently mapped to some valueFuture<Boolean>AsyncMap. replaceIfPresent(K k, V oldValue, V newValue)Replace the entry only if it is currently mapped to a specific valuedefault Future<Boolean>AsyncMap. replaceIfPresent(K k, V oldValue, V newValue, long ttl)Replace the entry only if it is currently mapped to a specific valueFuture<Integer>AsyncMap. size()Provide the number of entries in the mapFuture<List<V>>AsyncMap. values()Get the values of the map, asynchronously.default <T> Future<T>SharedData. withLocalLock(String name, long timeout, Supplier<Future<T>> block)LikeSharedData.withLocalLock(String, Supplier)but specifying a timeout.default <T> Future<T>SharedData. withLocalLock(String name, Supplier<Future<T>> block)Get an asynchronous local lock with the specified name.default <T> Future<T>SharedData. withLock(String name, long timeout, Supplier<Future<T>> block)LikeSharedData.withLock(String, Supplier)but specifying a timeout.default <T> Future<T>SharedData. withLock(String name, Supplier<Future<T>> block)Get an asynchronous lock with the specified name.Method parameters in io.vertx.core.shareddata with type arguments of type Future Modifier and Type Method Description default <T> Future<T>SharedData. withLocalLock(String name, long timeout, Supplier<Future<T>> block)LikeSharedData.withLocalLock(String, Supplier)but specifying a timeout.default <T> Future<T>SharedData. withLocalLock(String name, Supplier<Future<T>> block)Get an asynchronous local lock with the specified name.default <T> Future<T>SharedData. withLock(String name, long timeout, Supplier<Future<T>> block)LikeSharedData.withLock(String, Supplier)but specifying a timeout.default <T> Future<T>SharedData. withLock(String name, Supplier<Future<T>> block)Get an asynchronous lock with the specified name. -
Uses of Future in io.vertx.core.spi.dns
Methods in io.vertx.core.spi.dns that return Future Modifier and Type Method Description Future<Void>AddressResolverProvider. close() -
Uses of Future in io.vertx.core.spi.endpoint
Methods in io.vertx.core.spi.endpoint that return Future Modifier and Type Method Description Future<D>EndpointResolver. resolve(A address, EndpointBuilder<E,S> builder)Resolve an address to the resolver state for this name. -
Uses of Future in io.vertx.core.streams
Methods in io.vertx.core.streams that return Future Modifier and Type Method Description default <R,A>
Future<R>ReadStream. collect(Collector<T,A,R> collector)Apply acollectorto this stream, the obtained result is returned as a future.Future<Void>WriteStream. end()Ends the stream.default Future<Void>WriteStream. end(T data)Same asWriteStream.end()but writes some data to the stream before ending.default Future<Void>ReadStream. pipeTo(WriteStream<T> dst)Pipe thisReadStreamto theWriteStream.Future<Void>Pipe. to(WriteStream<T> dst)Start to pipe the elements to the destinationWriteStream.Future<Void>WriteStream. write(T data)Write some data to the stream.
-