Modifier and Type | Interface and Description |
---|---|
interface |
Promise<T>
Represents the writable side of an action that may, or may not, have occurred yet.
|
Modifier and Type | Method and Description |
---|---|
Handler<Throwable> |
Context.exceptionHandler() |
Handler<Throwable> |
Vertx.exceptionHandler() |
Modifier and Type | Method and Description |
---|---|
default Future<T> |
Future.andThen(Handler<AsyncResult<T>> handler)
Invokes the given
handler upon completion. |
default void |
VertxBuilder.buildClustered(Handler<AsyncResult<Vertx>> handler)
Creates a clustered instance.
|
void |
Vertx.close(Handler<AsyncResult<Void>> completionHandler)
Like
Vertx.close() but the completionHandler will be called when the close is complete |
void |
WorkerExecutor.close(Handler<AsyncResult<Void>> handler)
Close the executor.
|
static void |
Vertx.clusteredVertx(VertxOptions options,
Handler<AsyncResult<Vertx>> resultHandler)
Creates a clustered instance using the specified options.
|
void |
Vertx.deployVerticle(Class<? extends Verticle> verticleClass,
DeploymentOptions options,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(Verticle, DeploymentOptions, Handler) but Verticle instance is created by
invoking the default constructor of verticleClass . |
void |
Vertx.deployVerticle(String name,
DeploymentOptions options,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(String, Handler) but DeploymentOptions are provided to configure the
deployment. |
default void |
Vertx.deployVerticle(String name,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(String) but the completionHandler will be notified when the deployment is complete. |
void |
Vertx.deployVerticle(Supplier<Verticle> verticleSupplier,
DeploymentOptions options,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(Verticle, DeploymentOptions, Handler) but Verticle instance is created by
invoking the verticleSupplier . |
void |
Vertx.deployVerticle(Verticle verticle,
DeploymentOptions options,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(Verticle, Handler) but DeploymentOptions are provided to configure the
deployment. |
void |
Vertx.deployVerticle(Verticle verticle,
Handler<AsyncResult<String>> completionHandler)
Like
Vertx.deployVerticle(Verticle) but the completionHandler will be notified when the deployment is complete. |
TimeoutStream |
TimeoutStream.endHandler(Handler<Void> endHandler)
Deprecated.
|
Context |
Context.exceptionHandler(Handler<Throwable> handler)
Set an exception handler called when the context runs an action throwing an uncaught throwable.
When this handler is called,
Vertx.currentContext() will return this context. |
TimeoutStream |
TimeoutStream.exceptionHandler(Handler<Throwable> handler)
Deprecated.
|
Vertx |
Vertx.exceptionHandler(Handler<Throwable> handler)
Set a default exception handler for
Context , set on Context.exceptionHandler(Handler) at creation. |
default <T> void |
Context.executeBlocking(Callable<T> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Like
Context.executeBlocking(Callable, boolean) but using a callback. |
default <T> void |
Vertx.executeBlocking(Callable<T> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Like
Vertx.executeBlocking(Callable, boolean) but using a callback. |
default <T> void |
WorkerExecutor.executeBlocking(Callable<T> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Like
WorkerExecutor.executeBlocking(Callable, boolean) but using a callback. |
default <T> void |
Context.executeBlocking(Callable<T> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Like
Context.executeBlocking(Callable) but using a callback. |
default <T> void |
Vertx.executeBlocking(Callable<T> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Like
Vertx.executeBlocking(Callable) but using a callback. |
default <T> void |
WorkerExecutor.executeBlocking(Callable<T> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Like
WorkerExecutor.executeBlocking(Callable) but using a callback. |
default <T> Future<T> |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler)
Deprecated.
instead use
Context.executeBlocking(Callable) |
default <T> Future<T> |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler)
Deprecated.
instead use
Vertx.executeBlocking(Callable) |
default <T> Future<T> |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler)
Deprecated.
instead use
WorkerExecutor.executeBlocking(Callable) |
<T> Future<T> |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered)
Deprecated.
instead use
Context.executeBlocking(Callable, boolean) |
default <T> Future<T> |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered)
Deprecated.
instead use
Vertx.executeBlocking(Callable, boolean) |
<T> Future<T> |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered)
Deprecated.
|
<T> void |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Context.executeBlocking(Callable, boolean) |
<T> void |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Context.executeBlocking(Callable, boolean) |
default <T> void |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
use instead
Vertx.executeBlocking(Callable, boolean) |
default <T> void |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
use instead
Vertx.executeBlocking(Callable, boolean) |
<T> void |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
|
<T> void |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
boolean ordered,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
|
default <T> void |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Context.executeBlocking(Callable) |
default <T> void |
Context.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Context.executeBlocking(Callable) |
default <T> void |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Vertx.executeBlocking(Callable) |
default <T> void |
Vertx.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
Vertx.executeBlocking(Callable) |
default <T> void |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
WorkerExecutor.executeBlocking(Callable) |
default <T> void |
WorkerExecutor.executeBlocking(Handler<Promise<T>> blockingCodeHandler,
Handler<AsyncResult<T>> resultHandler)
Deprecated.
instead use
WorkerExecutor.executeBlocking(Callable) |
static <T> Future<T> |
Future.future(Handler<Promise<T>> handler)
Create a future that hasn't completed yet and that is passed to the
handler before it is returned. |
TimeoutStream |
TimeoutStream.handler(Handler<Long> handler)
Deprecated.
|
CompositeFuture |
CompositeFuture.onComplete(Handler<AsyncResult<CompositeFuture>> handler) |
Future<T> |
Future.onComplete(Handler<AsyncResult<T>> handler)
Add a handler to be notified of the result.
|
default Future<T> |
Future.onComplete(Handler<T> successHandler,
Handler<Throwable> failureHandler)
Add handlers to be notified on succeeded result and failed result.
|
default Future<T> |
Future.onComplete(Handler<T> successHandler,
Handler<Throwable> failureHandler)
Add handlers to be notified on succeeded result and failed result.
|
default Future<T> |
Future.onFailure(Handler<Throwable> handler)
Add a handler to be notified of the failed result.
|
default CompositeFuture |
CompositeFuture.onFailure(Handler<Throwable> handler) |
default CompositeFuture |
CompositeFuture.onSuccess(Handler<CompositeFuture> handler) |
default Future<T> |
Future.onSuccess(Handler<T> handler)
Add a handler to be notified of the succeeded result.
|
void |
Context.runOnContext(Handler<Void> action)
Run the specified action asynchronously on the same context, some time after the current execution has completed.
|
void |
Vertx.runOnContext(Handler<Void> action)
Puts the handler on the event queue for the current context so it will be run asynchronously ASAP after all
preceeding events have been handled.
|
default long |
Vertx.setPeriodic(long delay,
Handler<Long> handler)
Set a periodic timer to fire every
delay milliseconds, at which point handler will be called with
the id of the timer. |
long |
Vertx.setPeriodic(long initialDelay,
long delay,
Handler<Long> handler)
Set a periodic timer to fire every
delay milliseconds with initial delay, at which point handler will be called with
the id of the timer. |
long |
Vertx.setTimer(long delay,
Handler<Long> handler)
Set a one-shot timer to fire after
delay milliseconds, at which point handler will be called with
the id of the timer. |
void |
Vertx.undeploy(String deploymentID,
Handler<AsyncResult<Void>> completionHandler)
Like
Vertx.undeploy(String) but the completionHandler will be notified when the undeployment is complete. |
Modifier and Type | Method and Description |
---|---|
DatagramSocket |
DatagramSocket.blockMulticastGroup(String multicastAddress,
String sourceToBlock,
Handler<AsyncResult<Void>> handler)
Block the given address for the given multicast address and notifies the
Handler once
the operation completes. |
DatagramSocket |
DatagramSocket.blockMulticastGroup(String multicastAddress,
String networkInterface,
String sourceToBlock,
Handler<AsyncResult<Void>> handler)
Block the given address for the given multicast address on the given network interface and notifies
the
Handler once the operation completes. |
void |
DatagramSocket.close(Handler<AsyncResult<Void>> handler)
Closes the
DatagramSocket implementation asynchronous
and notifies the handler once done. |
DatagramSocket |
DatagramSocket.endHandler(Handler<Void> endHandler)
Deprecated.
removed in Vert.x 5
|
DatagramSocket |
DatagramSocket.exceptionHandler(Handler<Throwable> handler) |
DatagramSocket |
DatagramSocket.handler(Handler<DatagramPacket> handler) |
DatagramSocket |
DatagramSocket.listen(int port,
String host,
Handler<AsyncResult<DatagramSocket>> handler)
Start listening on the given port and host.
|
DatagramSocket |
DatagramSocket.listenMulticastGroup(String multicastAddress,
Handler<AsyncResult<Void>> handler)
Joins a multicast group and listens for packets send to it.
|
DatagramSocket |
DatagramSocket.listenMulticastGroup(String multicastAddress,
String networkInterface,
String source,
Handler<AsyncResult<Void>> handler)
Joins a multicast group and listens for packets send to it on the given network interface.
|
DatagramSocket |
DatagramSocket.send(Buffer packet,
int port,
String host,
Handler<AsyncResult<Void>> handler)
Write the given
Buffer to the SocketAddress . |
DatagramSocket |
DatagramSocket.send(String str,
int port,
String host,
Handler<AsyncResult<Void>> handler)
Write the given
String to the SocketAddress using UTF8 encoding. |
DatagramSocket |
DatagramSocket.send(String str,
String enc,
int port,
String host,
Handler<AsyncResult<Void>> handler)
Write the given
String to the SocketAddress using the given encoding. |
DatagramSocket |
DatagramSocket.unlistenMulticastGroup(String multicastAddress,
Handler<AsyncResult<Void>> handler)
Leaves a multicast group and stops listening for packets send to it.
|
DatagramSocket |
DatagramSocket.unlistenMulticastGroup(String multicastAddress,
String networkInterface,
String source,
Handler<AsyncResult<Void>> handler)
Leaves a multicast group and stops listening for packets send to it on the given network interface.
|
Modifier and Type | Method and Description |
---|---|
void |
DnsClient.close(Handler<AsyncResult<Void>> handler)
Close the client.
|
DnsClient |
DnsClient.lookup(String name,
Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.
|
DnsClient |
DnsClient.lookup4(String name,
Handler<AsyncResult<String>> handler)
Try to lookup the A (ipv4) record for the given name.
|
DnsClient |
DnsClient.lookup6(String name,
Handler<AsyncResult<String>> handler)
Try to lookup the AAAA (ipv6) record for the given name.
|
DnsClient |
DnsClient.resolveA(String name,
Handler<AsyncResult<List<String>>> handler)
Try to resolve all A (ipv4) records for the given name.
|
DnsClient |
DnsClient.resolveAAAA(String name,
Handler<AsyncResult<List<String>>> handler)
Try to resolve all AAAA (ipv6) records for the given name.
|
DnsClient |
DnsClient.resolveCNAME(String name,
Handler<AsyncResult<List<String>>> handler)
Try to resolve the CNAME record for the given name.
|
DnsClient |
DnsClient.resolveMX(String name,
Handler<AsyncResult<List<MxRecord>>> handler)
Try to resolve the MX records for the given name.
|
DnsClient |
DnsClient.resolveNS(String name,
Handler<AsyncResult<List<String>>> handler)
Try to resolve the NS records for the given name.
|
DnsClient |
DnsClient.resolvePTR(String name,
Handler<AsyncResult<String>> handler)
Try to resolve the PTR record for the given name.
|
DnsClient |
DnsClient.resolveSRV(String name,
Handler<AsyncResult<List<SrvRecord>>> handler)
Try to resolve the SRV records for the given name.
|
DnsClient |
DnsClient.resolveTXT(String name,
Handler<AsyncResult<List<String>>> handler)
Try to resolve the TXT records for the given name.
|
DnsClient |
DnsClient.reverseLookup(String ipaddress,
Handler<AsyncResult<String>> handler)
Try to do a reverse lookup of an IP address.
|
Modifier and Type | Method and Description |
---|---|
<T> EventBus |
EventBus.addInboundInterceptor(Handler<DeliveryContext<T>> interceptor)
Add an interceptor that will be called whenever a message is received by Vert.x
|
<T> EventBus |
EventBus.addOutboundInterceptor(Handler<DeliveryContext<T>> interceptor)
Add an interceptor that will be called whenever a message is sent from Vert.x
|
void |
MessageProducer.close(Handler<AsyncResult<Void>> handler)
Same as
MessageProducer.close() but with an handler called when the operation completes |
void |
MessageConsumer.completionHandler(Handler<AsyncResult<Void>> completionHandler)
Optional method which can be called to indicate when the registration has been propagated across the cluster.
|
<T> MessageConsumer<T> |
EventBus.consumer(String address,
Handler<Message<T>> handler)
Create a consumer and register it against the specified address.
|
MessageConsumer<T> |
MessageConsumer.endHandler(Handler<Void> endHandler) |
MessageConsumer<T> |
MessageConsumer.exceptionHandler(Handler<Throwable> handler) |
MessageConsumer<T> |
MessageConsumer.handler(Handler<Message<T>> handler) |
<T> MessageConsumer<T> |
EventBus.localConsumer(String address,
Handler<Message<T>> handler)
Like
EventBus.consumer(String, Handler) but the address won't be propagated across the cluster. |
<T> EventBus |
EventBus.removeInboundInterceptor(Handler<DeliveryContext<T>> interceptor)
Remove an interceptor that was added by
EventBus.addInboundInterceptor(Handler) |
<T> EventBus |
EventBus.removeOutboundInterceptor(Handler<DeliveryContext<T>> interceptor)
Remove an interceptor that was added by
EventBus.addOutboundInterceptor(Handler) |
default <R> void |
Message.replyAndRequest(Object message,
DeliveryOptions options,
Handler<AsyncResult<Message<R>>> replyHandler)
Like
Message.replyAndRequest(Object, Handler) but specifying options that can be used
to configure the delivery. |
default <R> void |
Message.replyAndRequest(Object message,
Handler<AsyncResult<Message<R>>> replyHandler)
Reply to this message, specifying a
replyHandler for the reply - i.e. |
default <T> EventBus |
EventBus.request(String address,
Object message,
DeliveryOptions options,
Handler<AsyncResult<Message<T>>> replyHandler)
Like
EventBus.request(String, Object, Handler) but specifying options that can be used to configure the delivery. |
default <T> EventBus |
EventBus.request(String address,
Object message,
Handler<AsyncResult<Message<T>>> replyHandler)
Sends a message and specify a
replyHandler that will be called if the recipient
subsequently replies to the message. |
void |
MessageConsumer.unregister(Handler<AsyncResult<Void>> completionHandler)
Unregisters the handler which created this registration
|
void |
MessageProducer.write(T body,
Handler<AsyncResult<Void>> handler)
Write a message to the event-bus, either sending or publishing.
|
Modifier and Type | Method and Description |
---|---|
FileSystem |
FileSystem.chmod(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented by
path to perms , asynchronously. |
FileSystem |
FileSystem.chmodRecursive(String path,
String perms,
String dirPerms,
Handler<AsyncResult<Void>> handler)
Change the permissions on the file represented by
path to perms , asynchronously. |
FileSystem |
FileSystem.chown(String path,
String user,
String group,
Handler<AsyncResult<Void>> handler)
Change the ownership on the file represented by
path to user and {code group}, asynchronously. |
void |
AsyncFile.close(Handler<AsyncResult<Void>> handler)
Close the file.
|
FileSystem |
FileSystem.copy(String from,
String to,
CopyOptions options,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to , asynchronously. |
FileSystem |
FileSystem.copy(String from,
String to,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to , asynchronously. |
FileSystem |
FileSystem.copyRecursive(String from,
String to,
boolean recursive,
Handler<AsyncResult<Void>> handler)
Copy a file from the path
from to path to , asynchronously. |
FileSystem |
FileSystem.createFile(String path,
Handler<AsyncResult<Void>> handler)
Creates an empty file with the specified
path , asynchronously. |
FileSystem |
FileSystem.createFile(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Creates an empty file with the specified
path and permissions perms , asynchronously. |
FileSystem |
FileSystem.createTempDirectory(String prefix,
Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given
prefix to generate its name, asynchronously.
|
FileSystem |
FileSystem.createTempDirectory(String prefix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new directory in the default temporary-file directory, using the given
prefix to generate its name, asynchronously.
|
FileSystem |
FileSystem.createTempDirectory(String dir,
String prefix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new directory in the directory provided by the path
path , using the given
prefix to generate its name, asynchronously. |
FileSystem |
FileSystem.createTempFile(String prefix,
String suffix,
Handler<AsyncResult<String>> handler)
Creates a new file in the default temporary-file directory, using the given
prefix and suffix to generate its name, asynchronously.
|
FileSystem |
FileSystem.createTempFile(String prefix,
String suffix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the path
dir , using the given
prefix and suffix to generate its name, asynchronously. |
FileSystem |
FileSystem.createTempFile(String dir,
String prefix,
String suffix,
String perms,
Handler<AsyncResult<String>> handler)
Creates a new file in the directory provided by the path
dir , using the given
prefix and suffix to generate its name, asynchronously. |
FileSystem |
FileSystem.delete(String path,
Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specified
path , asynchronously. |
FileSystem |
FileSystem.deleteRecursive(String path,
boolean recursive,
Handler<AsyncResult<Void>> handler)
Deletes the file represented by the specified
path , asynchronously. |
AsyncFile |
AsyncFile.drainHandler(Handler<Void> handler) |
AsyncFile |
AsyncFile.endHandler(Handler<Void> endHandler) |
AsyncFile |
AsyncFile.exceptionHandler(Handler<Throwable> handler) |
FileSystem |
FileSystem.exists(String path,
Handler<AsyncResult<Boolean>> handler)
Determines whether the file as specified by the path
path exists, asynchronously. |
AsyncFile |
AsyncFile.flush(Handler<AsyncResult<Void>> handler)
Same as
AsyncFile.flush() but the handler will be called when the flush is complete or if an error occurs |
FileSystem |
FileSystem.fsProps(String path,
Handler<AsyncResult<FileSystemProps>> handler)
Returns properties of the file-system being used by the specified
path , asynchronously. |
AsyncFile |
AsyncFile.handler(Handler<Buffer> handler) |
void |
AsyncFileLock.isValid(Handler<AsyncResult<Boolean>> handler)
Like
AsyncFileLock.isValid() but the handler will be called when the operation completes or if an error occurs. |
FileSystem |
FileSystem.link(String link,
String existing,
Handler<AsyncResult<Void>> handler)
Create a hard link on the file system from
link to existing , asynchronously. |
void |
AsyncFile.lock(Handler<AsyncResult<AsyncFileLock>> handler)
Like
AsyncFile.lock() but the handler will be called when the operation is complete or if an error occurs. |
void |
AsyncFile.lock(long position,
long size,
boolean shared,
Handler<AsyncResult<AsyncFileLock>> handler)
Like
AsyncFile.lock(long, long, boolean) but the handler will be called when the operation is complete or if an error occurs. |
FileSystem |
FileSystem.lprops(String path,
Handler<AsyncResult<FileProps>> handler)
Obtain properties for the link represented by
path , asynchronously. |
FileSystem |
FileSystem.mkdir(String path,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path , asynchronously. |
FileSystem |
FileSystem.mkdir(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path , asynchronously. |
FileSystem |
FileSystem.mkdirs(String path,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path and any non existent parents, asynchronously. |
FileSystem |
FileSystem.mkdirs(String path,
String perms,
Handler<AsyncResult<Void>> handler)
Create the directory represented by
path and any non existent parents, asynchronously. |
FileSystem |
FileSystem.move(String from,
String to,
CopyOptions options,
Handler<AsyncResult<Void>> handler)
Move a file from the path
from to path to , asynchronously. |
FileSystem |
FileSystem.move(String from,
String to,
Handler<AsyncResult<Void>> handler)
Move a file from the path
from to path to , asynchronously. |
FileSystem |
FileSystem.open(String path,
OpenOptions options,
Handler<AsyncResult<AsyncFile>> handler)
Open the file represented by
path , asynchronously. |
FileSystem |
FileSystem.props(String path,
Handler<AsyncResult<FileProps>> handler)
Obtain properties for the file represented by
path , asynchronously. |
AsyncFile |
AsyncFile.read(Buffer buffer,
int offset,
long position,
int length,
Handler<AsyncResult<Buffer>> handler)
Reads
length bytes of data from the file at position position in the file, asynchronously. |
FileSystem |
FileSystem.readDir(String path,
Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified by
path , asynchronously. |
FileSystem |
FileSystem.readDir(String path,
String filter,
Handler<AsyncResult<List<String>>> handler)
Read the contents of the directory specified by
path , asynchronously. |
FileSystem |
FileSystem.readFile(String path,
Handler<AsyncResult<Buffer>> handler)
Reads the entire file as represented by the path
path as a Buffer , asynchronously. |
FileSystem |
FileSystem.readSymlink(String link,
Handler<AsyncResult<String>> handler)
Returns the path representing the file that the symbolic link specified by
link points to, asynchronously. |
void |
AsyncFileLock.release(Handler<AsyncResult<Void>> handler)
Like
AsyncFileLock.release() but the handler will be called when the operation completes or if an error occurs. |
default void |
AsyncFile.size(Handler<AsyncResult<Long>> handler)
Like
AsyncFile.size() but the handler will be called when the operation is complete or if an error occurs. |
FileSystem |
FileSystem.symlink(String link,
String existing,
Handler<AsyncResult<Void>> handler)
Create a symbolic link on the file system from
link to existing , asynchronously. |
FileSystem |
FileSystem.truncate(String path,
long len,
Handler<AsyncResult<Void>> handler)
Truncate the file represented by
path to length len in bytes, asynchronously. |
FileSystem |
FileSystem.unlink(String link,
Handler<AsyncResult<Void>> handler)
Unlinks the link on the file system represented by the path
link , asynchronously. |
void |
AsyncFile.write(Buffer buffer,
long position,
Handler<AsyncResult<Void>> handler)
Write a
Buffer to the file at position position in the file, asynchronously. |
FileSystem |
FileSystem.writeFile(String path,
Buffer data,
Handler<AsyncResult<Void>> handler)
Creates the file, and writes the specified
Buffer data to the file represented by the path path ,
asynchronously. |
Modifier and Type | Field and Description |
---|---|
static Handler<HttpServerRequest> |
HttpServerRequest.DEFAULT_INVALID_REQUEST_HANDLER
The default invalid request handler, it uses the
HttpServerRequest.decoderResult() cause and the request information
to determine the status code of the response to be sent. |
Modifier and Type | Method and Description |
---|---|
Handler<HttpServerRequest> |
HttpServer.requestHandler() |
Handler<ServerWebSocket> |
HttpServer.webSocketHandler() |
Modifier and Type | Method and Description |
---|---|
ClientWebSocket |
ClientWebSocket.binaryMessageHandler(Handler<Buffer> handler) |
WebSocketBase |
WebSocketBase.binaryMessageHandler(Handler<Buffer> handler)
Set a binary message handler on the connection.
|
default HttpClientResponse |
HttpClientResponse.body(Handler<AsyncResult<Buffer>> handler)
Same as
HttpClientResponse.body() but with an handler called when the operation completes |
default HttpServerRequest |
HttpServerRequest.body(Handler<AsyncResult<Buffer>> handler)
Same as
HttpServerRequest.body() but with an handler called when the operation completes |
HttpServerResponse |
HttpServerResponse.bodyEndHandler(Handler<Void> handler)
Provides a handler that will be called after the last part of the body is written to the wire.
|
default HttpClientResponse |
HttpClientResponse.bodyHandler(Handler<Buffer> bodyHandler)
Convenience method for receiving the entire request body in one piece.
|
default HttpServerRequest |
HttpServerRequest.bodyHandler(Handler<Buffer> bodyHandler)
Convenience method for receiving the entire request body in one piece.
|
void |
WebSocketClient.close(Handler<AsyncResult<Void>> handler)
Close the client.
|
void |
HttpServer.close(Handler<AsyncResult<Void>> completionHandler)
Like
HttpServer.close() but supplying a handler that will be called when the server is actually closed (or has failed). |
default void |
HttpConnection.close(Handler<AsyncResult<Void>> handler)
Close the connection and all the currently active streams.
|
void |
HttpClient.close(Handler<AsyncResult<Void>> handler)
Close the client.
|
void |
WebSocketBase.close(Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.close() but with an handler called when the operation completes |
void |
WebSocketBase.close(short statusCode,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.close(short) but with an handler called when the operation completes |
void |
WebSocketBase.close(short statusCode,
String reason,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.close(short, String) but with an handler called when the operation completes |
HttpServerResponse |
HttpServerResponse.closeHandler(Handler<Void> handler)
Set a close handler for the response, this is called when the underlying connection is closed and the response
was still using the connection.
|
ServerWebSocket |
ServerWebSocket.closeHandler(Handler<Void> handler) |
WebSocket |
WebSocket.closeHandler(Handler<Void> handler) |
HttpConnection |
HttpConnection.closeHandler(Handler<Void> handler)
Set a close handler.
|
ClientWebSocket |
ClientWebSocket.closeHandler(Handler<Void> handler) |
WebSocketBase |
WebSocketBase.closeHandler(Handler<Void> handler)
Set a close handler.
|
void |
HttpClientRequest.connect(Handler<AsyncResult<HttpClientResponse>> handler)
Create an HTTP tunnel to the server.
|
default void |
WebSocketClient.connect(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the specified port, host and relative request URI
|
default void |
ClientWebSocket.connect(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the specified port, host and relative request URI
|
default void |
WebSocketClient.connect(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port, default client host and specified, relative request URI.
|
default void |
ClientWebSocket.connect(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect this WebSocket at the relative request URI using the default host and port.
|
default void |
WebSocketClient.connect(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket to the default client port and specified host and relative request URI.
|
default void |
ClientWebSocket.connect(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Connect this WebSocket to the host and relative request URI and default port.
|
void |
WebSocketClient.connect(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified options.
|
void |
ClientWebSocket.connect(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Connect a WebSocket with the specified options.
|
HttpServer |
HttpServer.connectionHandler(Handler<HttpConnection> handler)
Set a connection handler for the server.
|
HttpClient |
HttpClient.connectionHandler(Handler<HttpConnection> handler)
Deprecated.
instead use
HttpClientBuilder.withConnectHandler(Handler) |
HttpClientRequest |
HttpClientRequest.continueHandler(Handler<Void> handler)
If you send an HTTP request with the header
Expect set to the value 100-continue
and the server responds with an interim HTTP response with a status code of 100 and a Continue handler
has been set using this method, then the handler will be called. |
HttpClientResponse |
HttpClientResponse.customFrameHandler(Handler<HttpFrame> handler)
Set an custom frame handler.
|
HttpServerRequest |
HttpServerRequest.customFrameHandler(Handler<HttpFrame> handler)
Set a custom frame handler.
|
HttpServerResponse |
HttpServerResponse.drainHandler(Handler<Void> handler) |
ServerWebSocket |
ServerWebSocket.drainHandler(Handler<Void> handler) |
HttpClientRequest |
HttpClientRequest.drainHandler(Handler<Void> handler) |
WebSocket |
WebSocket.drainHandler(Handler<Void> handler) |
ClientWebSocket |
ClientWebSocket.drainHandler(Handler<Void> handler) |
WebSocketBase |
WebSocketBase.drainHandler(Handler<Void> handler) |
HttpClientRequest |
HttpClientRequest.earlyHintsHandler(Handler<MultiMap> handler)
If the server responds with an interim HTTP response with a status code of
103 and a Early Hints handler
has been set using this method, then the handler will be called. |
void |
HttpServerResponse.end(Buffer chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.end(Buffer) but with an handler called when the operation completes |
void |
HttpClientRequest.end(Buffer chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.end(String) but with an handler called when the operation completes |
default void |
HttpClientResponse.end(Handler<AsyncResult<Void>> handler)
Same as
HttpClientResponse.end() but with an handler called when the operation completes |
void |
HttpClientRequest.end(Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.end() but with an handler called when the operation completes |
default void |
HttpServerRequest.end(Handler<AsyncResult<Void>> handler)
Same as
HttpServerRequest.end() but with an handler called when the operation completes |
void |
WebSocketBase.end(Handler<AsyncResult<Void>> handler)
Same as
WriteStream.end() but with an handler called when the operation completes |
void |
HttpServerResponse.end(String chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.end(String) but with an handler called when the operation completes |
void |
HttpClientRequest.end(String chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.end(String) but with an handler called when the operation completes |
void |
HttpServerResponse.end(String chunk,
String enc,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.end(String, String) but with an handler called when the operation completes |
void |
HttpClientRequest.end(String chunk,
String enc,
Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.end(String,String) but with an handler called when the operation completes |
HttpClientResponse |
HttpClientResponse.endHandler(Handler<Void> endHandler) |
HttpServerResponse |
HttpServerResponse.endHandler(Handler<Void> handler)
Set an end handler for the response.
|
ServerWebSocket |
ServerWebSocket.endHandler(Handler<Void> endHandler) |
WebSocket |
WebSocket.endHandler(Handler<Void> endHandler) |
HttpServerFileUpload |
HttpServerFileUpload.endHandler(Handler<Void> endHandler) |
HttpServerRequest |
HttpServerRequest.endHandler(Handler<Void> endHandler) |
ClientWebSocket |
ClientWebSocket.endHandler(Handler<Void> endHandler) |
WebSocketBase |
WebSocketBase.endHandler(Handler<Void> endHandler) |
HttpClientResponse |
HttpClientResponse.exceptionHandler(Handler<Throwable> handler) |
HttpServerResponse |
HttpServerResponse.exceptionHandler(Handler<Throwable> handler) |
ServerWebSocket |
ServerWebSocket.exceptionHandler(Handler<Throwable> handler) |
HttpServer |
HttpServer.exceptionHandler(Handler<Throwable> handler)
Set an exception handler called for socket errors happening before the HTTP connection
is established, e.g during the TLS handshake.
|
HttpClientRequest |
HttpClientRequest.exceptionHandler(Handler<Throwable> handler) |
WebSocket |
WebSocket.exceptionHandler(Handler<Throwable> handler) |
HttpConnection |
HttpConnection.exceptionHandler(Handler<Throwable> handler)
Set an handler called when a connection error happens
|
HttpServerFileUpload |
HttpServerFileUpload.exceptionHandler(Handler<Throwable> handler) |
HttpServerRequest |
HttpServerRequest.exceptionHandler(Handler<Throwable> handler) |
ClientWebSocket |
ClientWebSocket.exceptionHandler(Handler<Throwable> handler) |
WebSocketBase |
WebSocketBase.exceptionHandler(Handler<Throwable> handler) |
ServerWebSocket |
ServerWebSocket.frameHandler(Handler<WebSocketFrame> handler) |
WebSocket |
WebSocket.frameHandler(Handler<WebSocketFrame> handler) |
ClientWebSocket |
ClientWebSocket.frameHandler(Handler<WebSocketFrame> handler) |
WebSocketBase |
WebSocketBase.frameHandler(Handler<WebSocketFrame> handler)
Set a frame handler on the connection.
|
HttpConnection |
HttpConnection.goAwayHandler(Handler<GoAway> handler)
Set an handler called when a GOAWAY frame is received.
|
HttpClientResponse |
HttpClientResponse.handler(Handler<Buffer> handler) |
ServerWebSocket |
ServerWebSocket.handler(Handler<Buffer> handler) |
WebSocket |
WebSocket.handler(Handler<Buffer> handler) |
HttpServerFileUpload |
HttpServerFileUpload.handler(Handler<Buffer> handler) |
HttpServerRequest |
HttpServerRequest.handler(Handler<Buffer> handler) |
ClientWebSocket |
ClientWebSocket.handler(Handler<Buffer> handler) |
WebSocketBase |
WebSocketBase.handler(Handler<Buffer> handler) |
HttpServerResponse |
HttpServerResponse.headersEndHandler(Handler<Void> handler)
Provide a handler that will be called just before the headers are written to the wire.
|
HttpServer |
HttpServer.invalidRequestHandler(Handler<HttpServerRequest> handler)
Set a
handler for handling invalid requests. |
default HttpServer |
HttpServer.listen(Handler<AsyncResult<HttpServer>> listenHandler)
Like
HttpServer.listen() but supplying a handler that will be called when the server is actually listening (or has failed). |
default HttpServer |
HttpServer.listen(int port,
Handler<AsyncResult<HttpServer>> listenHandler)
Like
HttpServer.listen(int) but supplying a handler that will be called when the server is actually listening (or has failed). |
default HttpServer |
HttpServer.listen(int port,
String host,
Handler<AsyncResult<HttpServer>> listenHandler)
Like
HttpServer.listen(int, String) but supplying a handler that will be called when the server is actually
listening (or has failed). |
default HttpServer |
HttpServer.listen(SocketAddress address,
Handler<AsyncResult<HttpServer>> listenHandler)
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).
|
HttpConnection |
HttpConnection.ping(Buffer data,
Handler<AsyncResult<Buffer>> pongHandler)
Send a PING frame to the remote endpoint.
|
HttpConnection |
HttpConnection.pingHandler(Handler<Buffer> handler)
Set an handler notified when a PING frame is received from the remote endpoint.
|
ClientWebSocket |
ClientWebSocket.pongHandler(Handler<Buffer> handler) |
WebSocketBase |
WebSocketBase.pongHandler(Handler<Buffer> handler)
Set a pong frame handler on the connection.
|
default HttpServerResponse |
HttpServerResponse.push(HttpMethod method,
String path,
Handler<AsyncResult<HttpServerResponse>> handler)
Like
HttpServerResponse.push(HttpMethod, String, String, MultiMap, Handler) with the host copied from the current request. |
default HttpServerResponse |
HttpServerResponse.push(HttpMethod method,
String path,
MultiMap headers,
Handler<AsyncResult<HttpServerResponse>> handler)
Like
HttpServerResponse.push(HttpMethod, String, String, MultiMap, Handler) with the host copied from the current request. |
default HttpServerResponse |
HttpServerResponse.push(HttpMethod method,
String host,
String path,
Handler<AsyncResult<HttpServerResponse>> handler)
Like
HttpServerResponse.push(HttpMethod, String, String, MultiMap, Handler) with no headers. |
default HttpServerResponse |
HttpServerResponse.push(HttpMethod method,
String host,
String path,
MultiMap headers,
Handler<AsyncResult<HttpServerResponse>> handler)
Push a response to the client.
The
handler will be notified with a success when the push can be sent and with
a failure when the client has disabled push or reset the push before it has been sent.
The handler may be queued if the client has reduced the maximum number of streams the server can push
concurrently.
Push can be sent only for peer initiated streams and if the response is not ended. |
HttpClientRequest |
HttpClientRequest.pushHandler(Handler<HttpClientRequest> handler)
Set a push handler for this request.
The handler is called when the client receives a push promise from the server.
|
HttpConnection |
HttpConnection.remoteSettingsHandler(Handler<Http2Settings> handler)
Set an handler that is called when remote endpoint
Http2Settings are updated. |
void |
HttpClient.request(HttpMethod method,
int port,
String host,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the
host and port . |
void |
HttpClient.request(HttpMethod method,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the default host and port.
|
void |
HttpClient.request(HttpMethod method,
String host,
String requestURI,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server at the
host and default port. |
void |
HttpClient.request(RequestOptions options,
Handler<AsyncResult<HttpClientRequest>> handler)
Create an HTTP request to send to the server.
|
HttpServer |
HttpServer.requestHandler(Handler<HttpServerRequest> handler)
Set the request handler for the server to
requestHandler . |
HttpClientRequest |
HttpClientRequest.response(Handler<AsyncResult<HttpClientResponse>> handler)
Set a callback for the associated
HttpClientResponse . |
default void |
HttpClientRequest.send(Buffer body,
Handler<AsyncResult<HttpClientResponse>> handler)
Send the request with a buffer
body . |
default void |
HttpServerResponse.send(Buffer body,
Handler<AsyncResult<Void>> handler)
Send the request with a buffer
body . |
default void |
HttpClientRequest.send(Handler<AsyncResult<HttpClientResponse>> handler)
Send the request with an empty body.
|
default void |
HttpServerResponse.send(Handler<AsyncResult<Void>> handler)
Send the request with an empty body.
|
default void |
HttpClientRequest.send(ReadStream<Buffer> body,
Handler<AsyncResult<HttpClientResponse>> handler)
Send the request with a stream
body . |
default void |
HttpServerResponse.send(ReadStream<Buffer> body,
Handler<AsyncResult<Void>> handler)
Send the request with a stream
body . |
default void |
HttpClientRequest.send(String body,
Handler<AsyncResult<HttpClientResponse>> handler)
Send the request with a string
body . |
default void |
HttpServerResponse.send(String body,
Handler<AsyncResult<Void>> handler)
Send the request with a string
body . |
default HttpServerResponse |
HttpServerResponse.sendFile(String filename,
Handler<AsyncResult<Void>> resultHandler)
Like
HttpServerResponse.sendFile(String) but providing a handler which will be notified once the file has been completely
written to the wire. |
default HttpServerResponse |
HttpServerResponse.sendFile(String filename,
long offset,
Handler<AsyncResult<Void>> resultHandler)
Like
HttpServerResponse.sendFile(String, long) but providing a handler which will be notified once the file has been completely
written to the wire. |
HttpServerResponse |
HttpServerResponse.sendFile(String filename,
long offset,
long length,
Handler<AsyncResult<Void>> resultHandler)
Like
HttpServerResponse.sendFile(String, long, long) but providing a handler which will be notified once the file has been
completely written to the wire. |
HttpClientRequest |
HttpClientRequest.sendHead(Handler<AsyncResult<Void>> completionHandler)
Like
HttpClientRequest.sendHead() but with an handler after headers have been sent. |
void |
ServerWebSocket.setHandshake(Future<Integer> future,
Handler<AsyncResult<Integer>> handler)
Set an asynchronous result for the handshake, upon completion of the specified
future , the
WebSocket will either be
accepted when the future succeeds with the HTTP 101 status code
rejected when the future is succeeds with an HTTP status code different than 101
rejected when the future fails with the HTTP status code 500
The provided future might be completed by the WebSocket itself, e.g calling the ServerWebSocket.close() method
will try to accept the handshake and close the WebSocket afterward. |
default void |
HttpConnection.shutdown(Handler<AsyncResult<Void>> handler)
Shutdown a 30 seconds timeout (
shutdown(30, TimeUnit.SECONDS) ). |
default void |
HttpConnection.shutdown(long timeout,
Handler<AsyncResult<Void>> handler)
Deprecated.
instead use
HttpConnection.shutdown(long, TimeUnit, Handler) |
default void |
HttpConnection.shutdown(long timeout,
TimeUnit unit,
Handler<AsyncResult<Void>> handler)
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a
timeout the connection will be closed. |
HttpConnection |
HttpConnection.shutdownHandler(Handler<Void> handler)
Set an handler called when a GOAWAY frame has been sent or received and all connections are closed.
|
HttpClientResponse |
HttpClientResponse.streamPriorityHandler(Handler<StreamPriority> handler)
Set an handler for stream priority changes.
|
HttpServerRequest |
HttpServerRequest.streamPriorityHandler(Handler<StreamPriority> handler)
Set an handler for stream priority changes
|
void |
HttpServerFileUpload.streamToFileSystem(String filename,
Handler<AsyncResult<Void>> handler)
Stream the content of this upload to the given file on storage.
|
ClientWebSocket |
ClientWebSocket.textMessageHandler(Handler<String> handler) |
WebSocketBase |
WebSocketBase.textMessageHandler(Handler<String> handler)
Set a text message handler on the connection.
|
default void |
HttpServerRequest.toNetSocket(Handler<AsyncResult<NetSocket>> handler)
Establish a TCP tunnel with the client.
|
default void |
HttpServerRequest.toWebSocket(Handler<AsyncResult<ServerWebSocket>> handler)
Upgrade the connection of the current request to a WebSocket.
|
HttpConnection |
HttpConnection.updateSettings(Http2Settings settings,
Handler<AsyncResult<Void>> completionHandler)
Send to the remote endpoint an update of this endpoint settings
The
completionHandler will be notified when the remote endpoint has acknowledged the settings. |
default void |
WebSocketClient.updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
WebSocketClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
HttpServer.updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
HttpServer.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
HttpClient.updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
HttpClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
WebSocketClient.updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
WebSocketClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
HttpServer.updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
HttpServer.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
HttpClient.updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
HttpClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
HttpServerRequest |
HttpServerRequest.uploadHandler(Handler<HttpServerFileUpload> uploadHandler)
Set an upload handler.
|
void |
HttpClient.webSocket(int port,
String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Deprecated.
|
void |
HttpClient.webSocket(String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Deprecated.
|
void |
HttpClient.webSocket(String host,
String requestURI,
Handler<AsyncResult<WebSocket>> handler)
Deprecated.
|
void |
HttpClient.webSocket(WebSocketConnectOptions options,
Handler<AsyncResult<WebSocket>> handler)
Deprecated.
|
void |
HttpClient.webSocketAbs(String url,
MultiMap headers,
WebsocketVersion version,
List<String> subProtocols,
Handler<AsyncResult<WebSocket>> handler)
Deprecated.
|
HttpServer |
HttpServer.webSocketHandler(Handler<ServerWebSocket> handler)
Set the WebSocket handler for the server to
wsHandler . |
HttpClientBuilder |
HttpClientBuilder.withConnectHandler(Handler<HttpConnection> handler)
Set a connection handler for the client.
|
void |
HttpServerResponse.write(String chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.write(String) but with an handler called when the operation completes |
void |
HttpClientRequest.write(String chunk,
Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.write(String) but with an handler called when the operation completes |
void |
HttpServerResponse.write(String chunk,
String enc,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.write(String, String) but with an handler called when the operation completes |
void |
HttpClientRequest.write(String chunk,
String enc,
Handler<AsyncResult<Void>> handler)
Same as
HttpClientRequest.write(String,String) but with an handler called when the operation completes |
ServerWebSocket |
ServerWebSocket.writeBinaryMessage(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writeBinaryMessage(Buffer data,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writeBinaryMessage(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writeBinaryMessage(Buffer data,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.writeBinaryMessage(Buffer) but with an handler called when the operation completes |
void |
HttpServerResponse.writeEarlyHints(MultiMap headers,
Handler<AsyncResult<Void>> handler)
Same as
HttpServerResponse.writeEarlyHints(MultiMap) but with an handler called when the operation completes |
ServerWebSocket |
ServerWebSocket.writeFinalBinaryFrame(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writeFinalBinaryFrame(Buffer data,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writeFinalBinaryFrame(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writeFinalBinaryFrame(Buffer data,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.writeFinalBinaryFrame(Buffer, Handler) but with an handler called when the operation completes |
ServerWebSocket |
ServerWebSocket.writeFinalTextFrame(String text,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writeFinalTextFrame(String text,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writeFinalTextFrame(String text,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writeFinalTextFrame(String text,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.writeFinalTextFrame(String, Handler) but with an handler called when the operation completes |
ServerWebSocket |
ServerWebSocket.writeFrame(WebSocketFrame frame,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writeFrame(WebSocketFrame frame,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writeFrame(WebSocketFrame frame,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writeFrame(WebSocketFrame frame,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.writeFrame(WebSocketFrame) but with an handler called when the operation completes |
ServerWebSocket |
ServerWebSocket.writePing(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writePing(Buffer data,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writePing(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writePing(Buffer data,
Handler<AsyncResult<Void>> handler)
Writes a ping frame to the connection.
|
ServerWebSocket |
ServerWebSocket.writePong(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writePong(Buffer data,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writePong(Buffer data,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writePong(Buffer data,
Handler<AsyncResult<Void>> handler)
Writes a pong frame to the connection.
|
ServerWebSocket |
ServerWebSocket.writeTextMessage(String text,
Handler<AsyncResult<Void>> handler) |
WebSocket |
WebSocket.writeTextMessage(String text,
Handler<AsyncResult<Void>> handler) |
ClientWebSocket |
ClientWebSocket.writeTextMessage(String text,
Handler<AsyncResult<Void>> handler) |
WebSocketBase |
WebSocketBase.writeTextMessage(String text,
Handler<AsyncResult<Void>> handler)
Same as
WebSocketBase.writeTextMessage(String) but with an handler called when the operation completes |
Modifier and Type | Method and Description |
---|---|
Handler<NetSocket> |
NetServer.connectHandler() |
Modifier and Type | Method and Description |
---|---|
void |
NetClient.close(Handler<AsyncResult<Void>> handler)
Close the client.
|
void |
NetSocket.close(Handler<AsyncResult<Void>> handler)
Close the NetSocket and notify the
handler when the operation completes. |
void |
NetServer.close(Handler<AsyncResult<Void>> completionHandler)
Like
NetServer.close() but supplying a handler that will be notified when close is complete. |
NetSocket |
NetSocket.closeHandler(Handler<Void> handler)
Set a handler that will be called when the NetSocket is closed
|
NetClient |
NetClient.connect(int port,
String host,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
NetClient |
NetClient.connect(int port,
String host,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
port and host . |
NetClient |
NetClient.connect(SocketAddress remoteAddress,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
NetClient |
NetClient.connect(SocketAddress remoteAddress,
String serverName,
Handler<AsyncResult<NetSocket>> connectHandler)
Open a connection to a server at the specific
remoteAddress . |
NetServer |
NetServer.connectHandler(Handler<NetSocket> handler)
Supply a connect handler for this server.
|
NetSocket |
NetSocket.drainHandler(Handler<Void> handler) |
void |
NetSocket.end(Handler<AsyncResult<Void>> handler)
Calls
NetSocket.end() . |
NetSocket |
NetSocket.endHandler(Handler<Void> endHandler)
Set an end handler.
|
NetSocket |
NetSocket.exceptionHandler(Handler<Throwable> handler) |
NetServer |
NetServer.exceptionHandler(Handler<Throwable> handler)
Set an exception handler called for socket errors happening before the connection
is passed to the
NetServer.connectHandler(io.vertx.core.Handler<io.vertx.core.net.NetSocket>) , e.g during the TLS handshake. |
NetSocket |
NetSocket.handler(Handler<Buffer> handler) |
default NetServer |
NetServer.listen(Handler<AsyncResult<NetServer>> listenHandler)
Like
NetServer.listen() but providing a handler that will be notified when the server is listening, or fails. |
default NetServer |
NetServer.listen(int port,
Handler<AsyncResult<NetServer>> listenHandler)
Like
NetServer.listen(int) but providing a handler that will be notified when the server is listening, or fails. |
default NetServer |
NetServer.listen(int port,
String host,
Handler<AsyncResult<NetServer>> listenHandler)
Like
NetServer.listen(int, String) but providing a handler that will be notified when the server is listening, or fails. |
default NetServer |
NetServer.listen(SocketAddress localAddress,
Handler<AsyncResult<NetServer>> listenHandler)
Like
NetServer.listen(SocketAddress) but providing a handler that will be notified when the server is listening, or fails. |
default NetSocket |
NetSocket.sendFile(String filename,
Handler<AsyncResult<Void>> resultHandler)
Same as
NetSocket.sendFile(String) but also takes a handler that will be called when the send has completed or
a failure has occurred |
default NetSocket |
NetSocket.sendFile(String filename,
long offset,
Handler<AsyncResult<Void>> resultHandler)
Same as
NetSocket.sendFile(String, long) but also takes a handler that will be called when the send has completed or
a failure has occurred |
NetSocket |
NetSocket.sendFile(String filename,
long offset,
long length,
Handler<AsyncResult<Void>> resultHandler)
Same as
NetSocket.sendFile(String, long, long) but also takes a handler that will be called when the send has completed or
a failure has occurred |
default void |
NetClient.updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
NetClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
NetServer.updateSSLOptions(SSLOptions options,
boolean force,
Handler<AsyncResult<Boolean>> handler)
Like
NetServer.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
NetClient.updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
NetClient.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
default void |
NetServer.updateSSLOptions(SSLOptions options,
Handler<AsyncResult<Boolean>> handler)
Like
NetServer.updateSSLOptions(SSLOptions) but supplying a handler that will be called when the update
happened (or has failed). |
NetSocket |
NetSocket.upgradeToSsl(Handler<AsyncResult<Void>> handler)
Upgrade channel to use SSL/TLS.
|
NetSocket |
NetSocket.upgradeToSsl(String serverName,
Handler<AsyncResult<Void>> handler)
Upgrade channel to use SSL/TLS.
|
void |
NetSocket.write(Buffer message,
Handler<AsyncResult<Void>> handler)
Like
WriteStream.write(Object) but with an handler called when the message has been written
or failed to be written. |
void |
NetSocket.write(String str,
Handler<AsyncResult<Void>> handler)
Same as
NetSocket.write(String) but with an handler called when the operation completes |
void |
NetSocket.write(String str,
String enc,
Handler<AsyncResult<Void>> handler)
Same as
NetSocket.write(String, String) but with an handler called when the operation completes |
Modifier and Type | Interface and Description |
---|---|
interface |
JsonParser
A parser class which allows to incrementally parse json elements and emit json parse events instead of parsing a json
element fully.
|
interface |
RecordParser
A helper class which allows you to easily parse protocols which are delimited by a sequence of bytes, or fixed
size records.
|
Modifier and Type | Method and Description |
---|---|
RecordParser |
RecordParser.endHandler(Handler<Void> endHandler) |
JsonParser |
JsonParser.endHandler(Handler<Void> endHandler) |
RecordParser |
RecordParser.exceptionHandler(Handler<Throwable> handler) |
JsonParser |
JsonParser.exceptionHandler(Handler<Throwable> handler) |
RecordParser |
RecordParser.handler(Handler<Buffer> handler) |
JsonParser |
JsonParser.handler(Handler<JsonEvent> handler) |
static RecordParser |
RecordParser.newDelimited(Buffer delim,
Handler<Buffer> output)
Like
RecordParser.newDelimited(Buffer) but set the output that will receive whole records
which have been parsed. |
static RecordParser |
RecordParser.newDelimited(String delim,
Handler<Buffer> output)
Like
RecordParser.newDelimited(String) but set the output that will receive whole records
which have been parsed. |
static RecordParser |
RecordParser.newFixed(int size,
Handler<Buffer> output)
Like
RecordParser.newFixed(int) but set the output that will receive whole records
which have been parsed. |
void |
RecordParser.setOutput(Handler<Buffer> output) |
Modifier and Type | Method and Description |
---|---|
default void |
Counter.addAndGet(long value,
Handler<AsyncResult<Long>> resultHandler)
Add the value to the counter atomically and return the new count
|
default void |
AsyncMap.clear(Handler<AsyncResult<Void>> resultHandler)
Clear all entries in the map
|
default void |
Counter.compareAndSet(long expected,
long value,
Handler<AsyncResult<Boolean>> resultHandler)
Set the counter to the specified value only if the current value is the expectec value.
|
default void |
Counter.decrementAndGet(Handler<AsyncResult<Long>> resultHandler)
Decrement the counter atomically and return the new count
|
default void |
AsyncMap.entries(Handler<AsyncResult<Map<K,V>>> resultHandler)
Get the entries of the map, asynchronously.
|
default void |
Counter.get(Handler<AsyncResult<Long>> resultHandler)
Get the current value of the counter
|
default void |
AsyncMap.get(K k,
Handler<AsyncResult<V>> resultHandler)
Get a value from the map, asynchronously.
|
default void |
Counter.getAndAdd(long value,
Handler<AsyncResult<Long>> resultHandler)
Add the value to the counter atomically and return the value before the add
|
default void |
Counter.getAndIncrement(Handler<AsyncResult<Long>> resultHandler)
Increment the counter atomically and return the value before the increment.
|
<K,V> void |
SharedData.getAsyncMap(String name,
Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)
Get the
AsyncMap with the specified name. |
<K,V> void |
SharedData.getClusterWideMap(String name,
Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)
Get the cluster wide map with the specified name.
|
void |
SharedData.getCounter(String name,
Handler<AsyncResult<Counter>> resultHandler)
Get an asynchronous counter.
|
<K,V> void |
SharedData.getLocalAsyncMap(String name,
Handler<AsyncResult<AsyncMap<K,V>>> resultHandler)
Get the
AsyncMap with the specified name. |
void |
SharedData.getLocalCounter(String name,
Handler<AsyncResult<Counter>> resultHandler)
Get an asynchronous local counter.
|
void |
SharedData.getLocalLock(String name,
Handler<AsyncResult<Lock>> resultHandler)
Get an asynchronous local lock with the specified name.
|
void |
SharedData.getLocalLockWithTimeout(String name,
long timeout,
Handler<AsyncResult<Lock>> resultHandler)
Like
SharedData.getLocalLock(String, Handler) but specifying a timeout. |
void |
SharedData.getLock(String name,
Handler<AsyncResult<Lock>> resultHandler)
Get an asynchronous lock with the specified name.
|
void |
SharedData.getLockWithTimeout(String name,
long timeout,
Handler<AsyncResult<Lock>> resultHandler)
Like
SharedData.getLock(String, Handler) but specifying a timeout. |
default void |
Counter.incrementAndGet(Handler<AsyncResult<Long>> resultHandler)
Increment the counter atomically and return the new count
|
default void |
AsyncMap.keys(Handler<AsyncResult<Set<K>>> resultHandler)
Get the keys of the map, asynchronously.
|
default void |
AsyncMap.put(K k,
V v,
Handler<AsyncResult<Void>> completionHandler)
Put a value in the map, asynchronously.
|
default void |
AsyncMap.put(K k,
V v,
long ttl,
Handler<AsyncResult<Void>> completionHandler)
Like
AsyncMap.put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but specifying a time to live for the entry. |
default void |
AsyncMap.putIfAbsent(K k,
V v,
Handler<AsyncResult<V>> completionHandler)
Put the entry only if there is no entry with the key already present.
|
default void |
AsyncMap.putIfAbsent(K k,
V v,
long ttl,
Handler<AsyncResult<V>> completionHandler)
Link
AsyncMap.putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>) but specifying a time to live for the entry. |
default void |
AsyncMap.remove(K k,
Handler<AsyncResult<V>> resultHandler)
Remove a value from the map, asynchronously.
|
default void |
AsyncMap.removeIfPresent(K k,
V v,
Handler<AsyncResult<Boolean>> resultHandler)
Remove a value from the map, only if entry already exists with same value.
|
default void |
AsyncMap.replace(K k,
V v,
Handler<AsyncResult<V>> resultHandler)
Replace the entry only if it is currently mapped to some value
|
default void |
AsyncMap.replace(K k,
V v,
long ttl,
Handler<AsyncResult<V>> resultHandler)
Replace the entry only if it is currently mapped to some value
|
default void |
AsyncMap.replaceIfPresent(K k,
V oldValue,
V newValue,
Handler<AsyncResult<Boolean>> resultHandler)
Replace the entry only if it is currently mapped to a specific value
|
default void |
AsyncMap.replaceIfPresent(K k,
V oldValue,
V newValue,
long ttl,
Handler<AsyncResult<Boolean>> resultHandler)
Replace the entry only if it is currently mapped to a specific value
|
default void |
AsyncMap.size(Handler<AsyncResult<Integer>> resultHandler)
Provide the number of entries in the map
|
default void |
AsyncMap.values(Handler<AsyncResult<List<V>>> resultHandler)
Get the values of the map, asynchronously.
|
Modifier and Type | Method and Description |
---|---|
void |
ResolverProvider.close(Handler<Void> doneHandler) |
Modifier and Type | Method and Description |
---|---|
WriteStream<T> |
WriteStream.drainHandler(Handler<Void> handler)
Set a drain handler on the stream.
|
void |
WriteStream.end(Handler<AsyncResult<Void>> handler)
Same as
WriteStream.end() but with an handler called when the operation completes |
default void |
WriteStream.end(T data,
Handler<AsyncResult<Void>> handler)
Same as
#end(T) but with an handler called when the operation completes |
ReadStream<T> |
ReadStream.endHandler(Handler<Void> endHandler)
Set an end handler.
|
ReadStream<T> |
ReadStream.exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
StreamBase |
StreamBase.exceptionHandler(Handler<Throwable> handler)
Set an exception handler.
|
WriteStream<T> |
WriteStream.exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
ReadStream<T> |
ReadStream.handler(Handler<T> handler)
Set a data handler.
|
default void |
ReadStream.pipeTo(WriteStream<T> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream . |
void |
Pipe.to(WriteStream<T> dst,
Handler<AsyncResult<Void>> completionHandler)
Start to pipe the elements to the destination
WriteStream . |
void |
WriteStream.write(T data,
Handler<AsyncResult<Void>> handler)
Same as
#write(T) but with an handler called when the operation completes |
Copyright © 2024 Eclipse. All rights reserved.