Refine search
/** * Returns the value of with the specified name. If there are * more than one values for the specified name, the first value is returned. * * @param name The name of the header to search * @return The first header value or {@code null} if there is no such entry */ @Nullable String get(String name);
/** * Gets an {@link Argument} based on its name (argument name). * * @param name the name of the argument, must not be {@code null} * @return the {@link Argument}, {@code null} if not found. */ @Nullable Argument getArgument(String name);
/** * Change the ownership on the file represented by {@code path} to {@code user} and {code group}, asynchronously. * * @param path the path to the file * @param user the user name, {@code null} will not change the user name * @param group the user group, {@code null} will not change the user group name * @param handler the handler that will be called on completion * @return a reference to this, so the API can be used fluently */ @Fluent FileSystem chown(String path, @Nullable String user, @Nullable String group, Handler<AsyncResult<Void>> handler);
/** * Get a value from the map, asynchronously. * * @param k the key * @param resultHandler - this will be called some time later with the async result. */ void get(K k, Handler<AsyncResult<@Nullable V>> resultHandler);
/** * Set a text message handler on the connection. This handler will be called similar to the * {@link #binaryMessageHandler(Handler)}, but the buffer will be converted to a String first * * @param handler the handler * @return a reference to this, so the API can be used fluently */ @Fluent WebSocketBase textMessageHandler(@Nullable Handler<String> handler);
/** * Link {@link #putIfAbsent} but specifying a time to live for the entry. Entry will expire and get evicted * after the ttl. * * @param k the key * @param v the value * @param ttl The time to live (in ms) for the entry * @param completionHandler the handler */ void putIfAbsent(K k, V v, long ttl, Handler<AsyncResult<@Nullable V>> completionHandler);
/** * Set a binary message handler on the connection. This handler serves a similar purpose to {@link #handler(Handler)} * except that if a message comes into the socket in multiple frames, the data from the frames will be aggregated * into a single buffer before calling the handler (using {@link WebSocketFrame#isFinal()} to find the boundaries). * * @param handler the handler * @return a reference to this, so the API can be used fluently */ @Fluent WebSocketBase binaryMessageHandler(@Nullable Handler<Buffer> handler);
/** * Replace the entry only if it is currently mapped to some value * * @param k the key * @param v the new value * @param resultHandler the result handler will be passed the previous value */ void replace(K k, V v, Handler<AsyncResult<@Nullable V>> resultHandler);
@Override public HttpServerResponse bodyEndHandler(@Nullable Handler<Void> handler) { synchronized (conn) { bodyEndHandler = handler; return this; } }
/** * Provides a handler that will be called after the last part of the body is written to the wire. * The handler is called asynchronously of when the response has been received by the client. * This provides a hook allowing you to do more operations once the request has been sent over the wire * such as resource cleanup. * * @param handler the handler * @return a reference to this, so the API can be used fluently */ @Fluent HttpServerResponse bodyEndHandler(@Nullable Handler<Void> handler);
/** * The reply address. Can be null. * * @return the reply address, or null, if message was sent without a reply handler. */ @Nullable String replyAddress();
/** * Set an exception handler called when the context runs an action throwing an uncaught throwable.<p/> * * When this handler is called, {@link Vertx#currentContext()} will return this context. * * @param handler the exception handler * @return a reference to this, so the API can be used fluently */ @Fluent Context exceptionHandler(@Nullable Handler<Throwable> handler);
/** * Gets the raw value of the given option. Raw values are the values as given in the user command line. * * @param option the option * @return the value, {@code null} if none. */ @Nullable String getRawValueForOption(Option option);
/** * Set an handler called when a {@literal GOAWAY} frame has been sent or received and all connections are closed. * <p/> * This is not implemented for HTTP/1.x. * * @param handler the handler * @return a reference to this, so the API can be used fluently */ @Fluent HttpConnection shutdownHandler(@Nullable Handler<Void> handler);
/** * Gets the raw value of the given argument. Raw values are the values as given in the user command line. * * @param arg the argument * @return the value, {@code null} if none. */ @Nullable String getRawValueForArgument(Argument arg);
/** * Gets an {@link Argument} based on its index. * * @param index the index, must be positive or zero. * @return the {@link Argument}, {@code null} if not found. */ @Nullable Argument getArgument(int index);
/** * Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used. * * @param name the name to resolve * @param handler the {@link io.vertx.core.Handler} to notify with the {@link io.vertx.core.AsyncResult}. * The handler will get notified with the resolved address if a record was found. If non was found it * will get notifed with {@code null}. If an error accours it will get failed. * @return a reference to this, so the API can be used fluently */ @Fluent DnsClient lookup(String name, Handler<AsyncResult<@Nullable String>> handler);