@Test public void testBodyEndHandler(TestContext context) { StringBuilder res = new StringBuilder(); context.assertEquals(response, response.bodyEndHandler(v -> { res.append("DONE"); })); context.assertEquals("", res.toString()); response.end(); context.assertEquals("DONE", res.toString()); }
@Override public HttpServerResponse bodyEndHandler(Handler<Void> handler) { this.bodyEndHandler = handler; return this; }
HttpServerResponseImpl implements HttpServerResponse { @Override public HttpServerResponse bodyEndHandler(Handler<Void> handler) { this.bodyEndHandler = handler; return this; } }
HttpServerResponseImpl implements HttpServerResponse { @Override public HttpServerResponse bodyEndHandler(Handler<Void> handler) { this.bodyEndHandler = handler; return this; } HttpServerResponseImpl(OutputStream output); }
HttpServerResponseImpl implements HttpServerResponse { @Override public HttpServerResponse bodyEndHandler(Handler<Void> handler) { this.bodyEndHandler = handler; return this; } HttpServerResponseImpl(OutputStream output); @Override boolean writeQueueFull(); @Override HttpServerResponse exceptionHandler(Handler<Throwable> handler); @Override HttpServerResponse setWriteQueueMaxSize(int maxSize); @Override HttpServerResponse drainHandler(Handler<Void> handler); @Override int getStatusCode(); @Override HttpServerResponse setStatusCode(int statusCode); @Override String getStatusMessage(); @Override HttpServerResponse setStatusMessage(String statusMessage); @Override HttpServerResponse setChunked(boolean chunked); @Override boolean isChunked(); @Override MultiMap headers(); @Override HttpServerResponse putHeader(String name, String value); @Override HttpServerResponse putHeader(CharSequence name, CharSequence value); @Override HttpServerResponse putHeader(String name, Iterable<String> values); @Override HttpServerResponse putHeader(CharSequence name, Iterable<CharSequence> values); @Override MultiMap trailers(); @Override HttpServerResponse putTrailer(String name, String value); @Override HttpServerResponse putTrailer(CharSequence name, CharSequence value); @Override HttpServerResponse putTrailer(String name, Iterable<String> values); @Override HttpServerResponse putTrailer(CharSequence name, Iterable<CharSequence> value); @Override HttpServerResponse closeHandler(Handler<Void> handler); @Override HttpServerResponse endHandler(Handler<Void> handler); @Override HttpServerResponse write(String chunk, String enc); @Override HttpServerResponse write(String chunk); @Override HttpServerResponse write(Buffer data); @Override HttpServerResponse writeContinue(); @Override void end(String chunk); @Override void end(String chunk, String enc); @Override void end(Buffer chunk); @Override void end(); @Override HttpServerResponse sendFile(String filename, long offset, long length); @Override HttpServerResponse sendFile(String filename, long offset, long length,
            Handler<AsyncResult<Void>> resultHandler); @Override void close(); @Override boolean ended(); @Override boolean closed(); @Override boolean headWritten(); @Override HttpServerResponse headersEndHandler(Handler<Void> handler); @Override HttpServerResponse bodyEndHandler(Handler<Void> handler); @Override long bytesWritten(); @Override int streamId(); @Override void reset(long code); @Override HttpServerResponse push(HttpMethod method, String path, MultiMap headers,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(io.vertx.core.http.HttpMethod method, String host, String path,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(HttpMethod method, String path, Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(HttpMethod method, String host, String path, MultiMap headers,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse writeCustomFrame(int type, int flags, Buffer payload); }
HttpServerResponseImpl implements HttpServerResponse { @Override public HttpServerResponse bodyEndHandler(Handler<Void> handler) { this.bodyEndHandler = handler; return this; } HttpServerResponseImpl(OutputStream output); @Override boolean writeQueueFull(); @Override HttpServerResponse exceptionHandler(Handler<Throwable> handler); @Override HttpServerResponse setWriteQueueMaxSize(int maxSize); @Override HttpServerResponse drainHandler(Handler<Void> handler); @Override int getStatusCode(); @Override HttpServerResponse setStatusCode(int statusCode); @Override String getStatusMessage(); @Override HttpServerResponse setStatusMessage(String statusMessage); @Override HttpServerResponse setChunked(boolean chunked); @Override boolean isChunked(); @Override MultiMap headers(); @Override HttpServerResponse putHeader(String name, String value); @Override HttpServerResponse putHeader(CharSequence name, CharSequence value); @Override HttpServerResponse putHeader(String name, Iterable<String> values); @Override HttpServerResponse putHeader(CharSequence name, Iterable<CharSequence> values); @Override MultiMap trailers(); @Override HttpServerResponse putTrailer(String name, String value); @Override HttpServerResponse putTrailer(CharSequence name, CharSequence value); @Override HttpServerResponse putTrailer(String name, Iterable<String> values); @Override HttpServerResponse putTrailer(CharSequence name, Iterable<CharSequence> value); @Override HttpServerResponse closeHandler(Handler<Void> handler); @Override HttpServerResponse endHandler(Handler<Void> handler); @Override HttpServerResponse write(String chunk, String enc); @Override HttpServerResponse write(String chunk); @Override HttpServerResponse write(Buffer data); @Override HttpServerResponse writeContinue(); @Override void end(String chunk); @Override void end(String chunk, String enc); @Override void end(Buffer chunk); @Override void end(); @Override HttpServerResponse sendFile(String filename, long offset, long length); @Override HttpServerResponse sendFile(String filename, long offset, long length,
            Handler<AsyncResult<Void>> resultHandler); @Override void close(); @Override boolean ended(); @Override boolean closed(); @Override boolean headWritten(); @Override HttpServerResponse headersEndHandler(Handler<Void> handler); @Override HttpServerResponse bodyEndHandler(Handler<Void> handler); @Override long bytesWritten(); @Override int streamId(); @Override void reset(long code); @Override HttpServerResponse push(HttpMethod method, String path, MultiMap headers,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(io.vertx.core.http.HttpMethod method, String host, String path,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(HttpMethod method, String path, Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse push(HttpMethod method, String host, String path, MultiMap headers,
            Handler<AsyncResult<HttpServerResponse>> handler); @Override HttpServerResponse writeCustomFrame(int type, int flags, Buffer payload);  }