public abstract class HttpClientRequestBase extends Object implements HttpClientRequest
| Modifier and Type | Field and Description |
|---|---|
protected HttpClientImpl |
client |
protected Throwable |
exceptionOccurred |
protected String |
host |
protected HttpMethod |
method |
protected String |
path |
protected int |
port |
protected String |
query |
protected SocketAddress |
server |
protected boolean |
ssl |
protected String |
uri |
| Modifier and Type | Method and Description |
|---|---|
String |
absoluteURI() |
protected void |
checkEnded() |
HttpClientRequest |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
HttpClientRequest |
fetch(long amount)
Fetch the specified
amount of elements. |
void |
handleException(Throwable t) |
String |
host() |
protected String |
hostHeader() |
HttpMethod |
method()
The HTTP method for the request.
|
String |
path() |
HttpClientRequest |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
String |
query() |
boolean |
reset(long code)
Reset this request:
for HTTP/2, this performs send an HTTP/2 reset frame with the specified error
code
for HTTP/1.x, this closes the connection when the current request is inflight
When the request has not yet been sent, the request will be aborted and false is returned as indicator. |
HttpClientRequest |
resume()
Resume reading, and sets the buffer in
flowing mode. |
HttpClientRequest |
setTimeout(long timeoutMs)
Set's the amount of time after which if the request does not return any data within the timeout period an
TimeoutException will be passed to the exception handler (if provided) and
the request will be closed. |
String |
uri() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnection, connectionHandler, continueHandler, drainHandler, end, end, end, end, end, end, end, end, endHandler, getHost, getRawMethod, getStreamPriority, handler, headers, isChunked, pushHandler, putHeader, putHeader, putHeader, putHeader, reset, sendHead, sendHead, setChunked, setFollowRedirects, setHost, setMaxRedirects, setRawMethod, setStreamPriority, setWriteQueueMaxSize, streamId, write, write, write, write, write, write, writeCustomFrame, writeCustomFramewriteQueueFullpipe, pipeTo, pipeToprotected final HttpClientImpl client
protected final HttpMethod method
protected final String uri
protected final String path
protected final String query
protected final String host
protected final int port
protected final SocketAddress server
protected final boolean ssl
protected Throwable exceptionOccurred
protected void checkEnded()
protected String hostHeader()
public String absoluteURI()
absoluteURI in interface HttpClientRequestpublic String query()
query in interface HttpClientRequestpublic String path()
path in interface HttpClientRequestpublic String uri()
uri in interface HttpClientRequestpublic String host()
public HttpMethod method()
HttpClientRequestmethod in interface HttpClientRequestpublic HttpClientRequest exceptionHandler(Handler<Throwable> handler)
WriteStreamexceptionHandler in interface HttpClientRequestexceptionHandler in interface ReadStream<HttpClientResponse>exceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<Buffer>handler - the exception handlerpublic HttpClientRequest setTimeout(long timeoutMs)
HttpClientRequestTimeoutException will be passed to the exception handler (if provided) and
the request will be closed.
Calling this method more than once has the effect of canceling any existing timeout and starting the timeout from scratch.
setTimeout in interface HttpClientRequesttimeoutMs - The quantity of time in milliseconds.public void handleException(Throwable t)
public boolean reset(long code)
HttpClientRequestcodereset in interface HttpClientRequestcode - the error codepublic HttpClientRequest pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
pause in interface HttpClientRequestpause in interface ReadStream<HttpClientResponse>public HttpClientRequest resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface HttpClientRequestresume in interface ReadStream<HttpClientResponse>public HttpClientRequest fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface HttpClientRequestfetch in interface ReadStream<HttpClientResponse>Copyright © 2020. All rights reserved.