Package | Description |
---|---|
io.vertx.core.http |
== Writing HTTP servers and clients
Vert.x allows you to easily write non blocking HTTP clients and servers.
|
io.vertx.core.spi.metrics |
Modifier and Type | Method and Description |
---|---|
HttpServerResponse |
HttpServerResponse.bodyEndHandler(Handler<Void> handler)
Provide a handler that will be called just before the last part of the body is written to the wire
and the response is ended.
|
HttpServerResponse |
HttpServerResponse.closeHandler(Handler<Void> handler)
Set a close handler for the response.
|
HttpServerResponse |
HttpServerResponse.drainHandler(Handler<Void> handler) |
HttpServerResponse |
HttpServerResponse.exceptionHandler(Handler<Throwable> handler) |
HttpServerResponse |
HttpServerResponse.headersEndHandler(Handler<Void> handler)
Provide a handler that will be called just before the headers are written to the wire.
|
HttpServerResponse |
HttpServerResponse.putHeader(CharSequence name,
CharSequence value)
Like
putHeader(String, String) but using CharSequence |
HttpServerResponse |
HttpServerResponse.putHeader(CharSequence name,
Iterable<CharSequence> values)
Like
putHeader(String, Iterable) but with CharSequence Iterable |
HttpServerResponse |
HttpServerResponse.putHeader(String name,
Iterable<String> values)
Like
putHeader(String, String) but providing multiple values via a String Iterable |
HttpServerResponse |
HttpServerResponse.putHeader(String name,
String value)
Put an HTTP header
|
HttpServerResponse |
HttpServerResponse.putTrailer(CharSequence name,
CharSequence value)
Like
putTrailer(String, String) but using CharSequence |
HttpServerResponse |
HttpServerResponse.putTrailer(CharSequence name,
Iterable<CharSequence> value)
Like
putTrailer(String, Iterable) but with CharSequence Iterable |
HttpServerResponse |
HttpServerResponse.putTrailer(String name,
Iterable<String> values)
Like
putTrailer(String, String) but providing multiple values via a String Iterable |
HttpServerResponse |
HttpServerResponse.putTrailer(String name,
String value)
Put an HTTP trailer
|
HttpServerResponse |
HttpServerRequest.response() |
default HttpServerResponse |
HttpServerResponse.sendFile(String filename)
Same as
sendFile(String, long) using offset @code{0} which means starting from the beginning of the file. |
default HttpServerResponse |
HttpServerResponse.sendFile(String filename,
Handler<AsyncResult<Void>> resultHandler)
Like
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)
Same as
sendFile(String, long, long) using length @code{Long.MAX_VALUE} which means until the end of the
file. |
default HttpServerResponse |
HttpServerResponse.sendFile(String filename,
long offset,
Handler<AsyncResult<Void>> resultHandler)
Like
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)
Ask the OS to stream a file as specified by
filename directly
from disk to the outgoing connection, bypassing userspace altogether
(where supported by the underlying operating system. |
HttpServerResponse |
HttpServerResponse.sendFile(String filename,
long offset,
long length,
Handler<AsyncResult<Void>> resultHandler)
Like
sendFile(String, long, long) but providing a handler which will be notified once the file has been
completely written to the wire. |
HttpServerResponse |
HttpServerResponse.setChunked(boolean chunked)
If
chunked is true , this response will use HTTP chunked encoding, and each call to write to the body
will correspond to a new HTTP chunk sent on the wire. |
HttpServerResponse |
HttpServerResponse.setStatusCode(int statusCode)
Set the status code.
|
HttpServerResponse |
HttpServerResponse.setStatusMessage(String statusMessage)
Set the status message
|
HttpServerResponse |
HttpServerResponse.setWriteQueueMaxSize(int maxSize) |
HttpServerResponse |
HttpServerResponse.write(Buffer data) |
HttpServerResponse |
HttpServerResponse.write(String chunk)
Write a
String to the response body, encoded in UTF-8. |
HttpServerResponse |
HttpServerResponse.write(String chunk,
String enc)
Write a
String to the response body, encoded using the encoding enc . |
HttpServerResponse |
HttpServerResponse.writeContinue()
Used to write an interim 100 Continue response to signify that the client should send the rest of the request.
|
Modifier and Type | Method and Description |
---|---|
void |
HttpServerMetrics.responseEnd(R requestMetric,
HttpServerResponse response)
Called when an http server response has ended.
|
Copyright © 2015. All rights reserved.