Package org.swisspush.gateleen.core.http
Class LocalHttpClientRequest
- java.lang.Object
-
- org.swisspush.gateleen.core.http.BufferBridge
-
- org.swisspush.gateleen.core.http.LocalHttpClientRequest
-
- All Implemented Interfaces:
io.vertx.core.http.HttpClientRequest,io.vertx.core.streams.StreamBase,io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>,FastFailHttpClientRequest
public class LocalHttpClientRequest extends BufferBridge implements FastFailHttpClientRequest
Bridges a HttpClientRequest to a HttpServerRequest sent to a request handler.- Author:
- https://github.com/lbovet [Laurent Bovet]
-
-
Field Summary
-
Fields inherited from interface org.swisspush.gateleen.core.http.FastFailHttpClientRequest
msg
-
-
Constructor Summary
Constructors Constructor Description LocalHttpClientRequest(io.vertx.core.http.HttpMethod method, String uri, io.vertx.core.Vertx vertx, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> routingContextHandler, io.vertx.core.http.HttpServerResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringabsoluteURI()io.vertx.core.http.HttpClientRequestauthority(io.vertx.core.net.HostAndPort authority)io.vertx.core.Future<io.vertx.core.http.HttpClientResponse>connect()voidconnect(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> handler)io.vertx.core.http.HttpConnectionconnection()io.vertx.core.http.HttpClientRequestconnectionHandler(io.vertx.core.Handler<io.vertx.core.http.HttpConnection> handler)io.vertx.core.http.HttpClientRequestdrainHandler(io.vertx.core.Handler<Void> handler)io.vertx.core.http.HttpClientRequestearlyHintsHandler(io.vertx.core.Handler<io.vertx.core.MultiMap> handler)io.vertx.core.Future<Void>end()io.vertx.core.Future<Void>end(io.vertx.core.buffer.Buffer chunk)io.vertx.core.Future<Void>end(String chunk)io.vertx.core.Future<Void>end(String chunk, String enc)io.vertx.core.http.HttpClientRequestexceptionHandler(io.vertx.core.Handler<Throwable> handler)StringgetHost()intgetMaxRedirects()io.vertx.core.http.HttpMethodgetMethod()intgetPort()StringgetRawMethod()StringgetURI()io.vertx.core.MultiMapheaders()booleanisChunked()booleanisFollowRedirects()io.vertx.core.http.HttpMethodmethod()intnumberOfRedirections()Stringpath()io.vertx.core.http.HttpClientRequestpushHandler(io.vertx.core.Handler<io.vertx.core.http.HttpClientRequest> handler)io.vertx.core.http.HttpClientRequestputHeader(CharSequence name, CharSequence value)io.vertx.core.http.HttpClientRequestputHeader(CharSequence name, Iterable<CharSequence> values)io.vertx.core.http.HttpClientRequestputHeader(String name, Iterable<String> values)io.vertx.core.http.HttpClientRequestputHeader(String name, String value)Stringquery()io.vertx.core.http.HttpClientRequestredirectHandler(Function<io.vertx.core.http.HttpClientResponse,io.vertx.core.Future<io.vertx.core.http.HttpClientRequest>> handler)booleanreset()booleanreset(long code)booleanreset(long code, Throwable cause)io.vertx.core.Future<io.vertx.core.http.HttpClientResponse>response()io.vertx.core.http.HttpClientRequestresponse(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> handler)io.vertx.core.Future<Void>sendHead()io.vertx.core.http.HttpClientRequestsendHead(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)io.vertx.core.http.HttpClientRequestsetChunked(boolean chunked)io.vertx.core.http.HttpClientRequestsetHost(String host)io.vertx.core.http.HttpClientRequestsetMaxRedirects(int maxRedirects)io.vertx.core.http.HttpClientRequestsetMethod(io.vertx.core.http.HttpMethod method)io.vertx.core.http.HttpClientRequestsetPort(int port)io.vertx.core.http.HttpClientRequestsetRawMethod(String method)io.vertx.core.http.HttpClientRequestsetTimeout(long timeoutMs)voidsetUri(String uri)io.vertx.core.http.HttpClientRequestsetURI(String uri)io.vertx.core.http.HttpClientRequestsetWriteQueueMaxSize(int maxSize)StringtraceOperation()io.vertx.core.http.HttpClientRequesttraceOperation(String op)Stringuri()io.vertx.core.http.HttpVersionversion()io.vertx.core.Future<Void>write(io.vertx.core.buffer.Buffer data)voidwrite(io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.Future<Void>write(String chunk)voidwrite(String chunk, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.Future<Void>write(String chunk, String enc)voidwrite(String chunk, String enc, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)io.vertx.core.http.HttpClientRequestwriteCustomFrame(int type, int flags, io.vertx.core.buffer.Buffer payload)booleanwriteQueueFull()-
Methods inherited from class org.swisspush.gateleen.core.http.BufferBridge
doEnd, doWrite, pump, setBodyHandler, setDataHandler, setEndHandler, setExceptionHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.swisspush.gateleen.core.http.FastFailHttpClientRequest
continueHandler, end, end, end, end, endHandler, fetch, getStreamPriority, handler, pause, resume, setFollowRedirects
-
-
-
-
Constructor Detail
-
LocalHttpClientRequest
public LocalHttpClientRequest(io.vertx.core.http.HttpMethod method, String uri, io.vertx.core.Vertx vertx, io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> routingContextHandler, io.vertx.core.http.HttpServerResponse response)
-
-
Method Detail
-
setChunked
public io.vertx.core.http.HttpClientRequest setChunked(boolean chunked)
- Specified by:
setChunkedin interfaceFastFailHttpClientRequest- Specified by:
setChunkedin interfaceio.vertx.core.http.HttpClientRequest
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceFastFailHttpClientRequest- Specified by:
isChunkedin interfaceio.vertx.core.http.HttpClientRequest
-
getMethod
public io.vertx.core.http.HttpMethod getMethod()
- Specified by:
getMethodin interfaceio.vertx.core.http.HttpClientRequest
-
method
public io.vertx.core.http.HttpMethod method()
- Specified by:
methodin interfaceFastFailHttpClientRequest
-
getRawMethod
public String getRawMethod()
- Specified by:
getRawMethodin interfaceFastFailHttpClientRequest
-
setRawMethod
public io.vertx.core.http.HttpClientRequest setRawMethod(String method)
- Specified by:
setRawMethodin interfaceFastFailHttpClientRequest
-
absoluteURI
public String absoluteURI()
- Specified by:
absoluteURIin interfaceFastFailHttpClientRequest- Specified by:
absoluteURIin interfaceio.vertx.core.http.HttpClientRequest
-
getURI
public String getURI()
- Specified by:
getURIin interfaceio.vertx.core.http.HttpClientRequest
-
setURI
public io.vertx.core.http.HttpClientRequest setURI(String uri)
- Specified by:
setURIin interfaceio.vertx.core.http.HttpClientRequest
-
uri
public String uri()
- Specified by:
uriin interfaceFastFailHttpClientRequest
-
path
public String path()
- Specified by:
pathin interfaceFastFailHttpClientRequest- Specified by:
pathin interfaceio.vertx.core.http.HttpClientRequest
-
query
public String query()
- Specified by:
queryin interfaceFastFailHttpClientRequest- Specified by:
queryin interfaceio.vertx.core.http.HttpClientRequest
-
setHost
public io.vertx.core.http.HttpClientRequest setHost(String host)
- Specified by:
setHostin interfaceFastFailHttpClientRequest- Specified by:
setHostin interfaceio.vertx.core.http.HttpClientRequest
-
getHost
public String getHost()
- Specified by:
getHostin interfaceFastFailHttpClientRequest- Specified by:
getHostin interfaceio.vertx.core.http.HttpClientRequest
-
setPort
public io.vertx.core.http.HttpClientRequest setPort(int port)
- Specified by:
setPortin interfaceio.vertx.core.http.HttpClientRequest
-
getPort
public int getPort()
- Specified by:
getPortin interfaceio.vertx.core.http.HttpClientRequest
-
isFollowRedirects
public boolean isFollowRedirects()
- Specified by:
isFollowRedirectsin interfaceio.vertx.core.http.HttpClientRequest
-
setMaxRedirects
public io.vertx.core.http.HttpClientRequest setMaxRedirects(int maxRedirects)
- Specified by:
setMaxRedirectsin interfaceio.vertx.core.http.HttpClientRequest
-
getMaxRedirects
public int getMaxRedirects()
- Specified by:
getMaxRedirectsin interfaceio.vertx.core.http.HttpClientRequest
-
numberOfRedirections
public int numberOfRedirections()
- Specified by:
numberOfRedirectionsin interfaceio.vertx.core.http.HttpClientRequest
-
headers
public io.vertx.core.MultiMap headers()
- Specified by:
headersin interfaceFastFailHttpClientRequest- Specified by:
headersin interfaceio.vertx.core.http.HttpClientRequest
-
putHeader
public io.vertx.core.http.HttpClientRequest putHeader(String name, String value)
- Specified by:
putHeaderin interfaceFastFailHttpClientRequest- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpClientRequest
-
putHeader
public io.vertx.core.http.HttpClientRequest putHeader(CharSequence name, CharSequence value)
- Specified by:
putHeaderin interfaceFastFailHttpClientRequest- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpClientRequest
-
putHeader
public io.vertx.core.http.HttpClientRequest putHeader(String name, Iterable<String> values)
- Specified by:
putHeaderin interfaceFastFailHttpClientRequest- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpClientRequest
-
putHeader
public io.vertx.core.http.HttpClientRequest putHeader(CharSequence name, Iterable<CharSequence> values)
- Specified by:
putHeaderin interfaceFastFailHttpClientRequest- Specified by:
putHeaderin interfaceio.vertx.core.http.HttpClientRequest
-
traceOperation
public io.vertx.core.http.HttpClientRequest traceOperation(String op)
- Specified by:
traceOperationin interfaceio.vertx.core.http.HttpClientRequest
-
traceOperation
public String traceOperation()
- Specified by:
traceOperationin interfaceio.vertx.core.http.HttpClientRequest
-
version
public io.vertx.core.http.HttpVersion version()
- Specified by:
versionin interfaceio.vertx.core.http.HttpClientRequest
-
sendHead
public io.vertx.core.Future<Void> sendHead()
- Specified by:
sendHeadin interfaceio.vertx.core.http.HttpClientRequest
-
sendHead
public io.vertx.core.http.HttpClientRequest sendHead(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
- Specified by:
sendHeadin interfaceio.vertx.core.http.HttpClientRequest
-
connect
public void connect(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> handler)
- Specified by:
connectin interfaceio.vertx.core.http.HttpClientRequest
-
connect
public io.vertx.core.Future<io.vertx.core.http.HttpClientResponse> connect()
- Specified by:
connectin interfaceio.vertx.core.http.HttpClientRequest
-
response
public io.vertx.core.http.HttpClientRequest response(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.http.HttpClientResponse>> handler)
- Specified by:
responsein interfaceio.vertx.core.http.HttpClientRequest
-
response
public io.vertx.core.Future<io.vertx.core.http.HttpClientResponse> response()
- Specified by:
responsein interfaceio.vertx.core.http.HttpClientRequest
-
write
public io.vertx.core.Future<Void> write(String chunk)
- Specified by:
writein interfaceio.vertx.core.http.HttpClientRequest
-
write
public io.vertx.core.Future<Void> write(String chunk, String enc)
- Specified by:
writein interfaceio.vertx.core.http.HttpClientRequest
-
write
public io.vertx.core.Future<Void> write(io.vertx.core.buffer.Buffer data)
- Specified by:
writein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
write
public void write(io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)- Specified by:
writein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
write
public void write(String chunk, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
- Specified by:
writein interfaceio.vertx.core.http.HttpClientRequest
-
write
public void write(String chunk, String enc, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
- Specified by:
writein interfaceio.vertx.core.http.HttpClientRequest
-
earlyHintsHandler
public io.vertx.core.http.HttpClientRequest earlyHintsHandler(io.vertx.core.Handler<io.vertx.core.MultiMap> handler)
- Specified by:
earlyHintsHandlerin interfaceio.vertx.core.http.HttpClientRequest
-
redirectHandler
public io.vertx.core.http.HttpClientRequest redirectHandler(Function<io.vertx.core.http.HttpClientResponse,io.vertx.core.Future<io.vertx.core.http.HttpClientRequest>> handler)
- Specified by:
redirectHandlerin interfaceio.vertx.core.http.HttpClientRequest
-
end
public io.vertx.core.Future<Void> end(String chunk)
- Specified by:
endin interfaceio.vertx.core.http.HttpClientRequest
-
end
public io.vertx.core.Future<Void> end(String chunk, String enc)
- Specified by:
endin interfaceio.vertx.core.http.HttpClientRequest
-
end
public io.vertx.core.Future<Void> end(io.vertx.core.buffer.Buffer chunk)
- Specified by:
endin interfaceio.vertx.core.http.HttpClientRequest- Specified by:
endin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
end
public io.vertx.core.Future<Void> end()
- Specified by:
endin interfaceio.vertx.core.http.HttpClientRequest- Specified by:
endin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
setTimeout
public io.vertx.core.http.HttpClientRequest setTimeout(long timeoutMs)
- Specified by:
setTimeoutin interfaceFastFailHttpClientRequest- Specified by:
setTimeoutin interfaceio.vertx.core.http.HttpClientRequest
-
pushHandler
public io.vertx.core.http.HttpClientRequest pushHandler(io.vertx.core.Handler<io.vertx.core.http.HttpClientRequest> handler)
- Specified by:
pushHandlerin interfaceFastFailHttpClientRequest- Specified by:
pushHandlerin interfaceio.vertx.core.http.HttpClientRequest
-
reset
public boolean reset()
- Specified by:
resetin interfaceio.vertx.core.http.HttpClientRequest
-
reset
public boolean reset(long code)
- Specified by:
resetin interfaceFastFailHttpClientRequest- Specified by:
resetin interfaceio.vertx.core.http.HttpClientRequest
-
reset
public boolean reset(long code, Throwable cause)- Specified by:
resetin interfaceio.vertx.core.http.HttpClientRequest
-
connection
public io.vertx.core.http.HttpConnection connection()
- Specified by:
connectionin interfaceFastFailHttpClientRequest- Specified by:
connectionin interfaceio.vertx.core.http.HttpClientRequest
-
connectionHandler
public io.vertx.core.http.HttpClientRequest connectionHandler(io.vertx.core.Handler<io.vertx.core.http.HttpConnection> handler)
- Specified by:
connectionHandlerin interfaceFastFailHttpClientRequest
-
writeCustomFrame
public io.vertx.core.http.HttpClientRequest writeCustomFrame(int type, int flags, io.vertx.core.buffer.Buffer payload)- Specified by:
writeCustomFramein interfaceFastFailHttpClientRequest- Specified by:
writeCustomFramein interfaceio.vertx.core.http.HttpClientRequest
-
setWriteQueueMaxSize
public io.vertx.core.http.HttpClientRequest setWriteQueueMaxSize(int maxSize)
- Specified by:
setWriteQueueMaxSizein interfaceFastFailHttpClientRequest- Specified by:
setWriteQueueMaxSizein interfaceio.vertx.core.http.HttpClientRequest- Specified by:
setWriteQueueMaxSizein interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
writeQueueFull
public boolean writeQueueFull()
- Specified by:
writeQueueFullin interfaceFastFailHttpClientRequest- Specified by:
writeQueueFullin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
drainHandler
public io.vertx.core.http.HttpClientRequest drainHandler(io.vertx.core.Handler<Void> handler)
- Specified by:
drainHandlerin interfaceFastFailHttpClientRequest- Specified by:
drainHandlerin interfaceio.vertx.core.http.HttpClientRequest- Specified by:
drainHandlerin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
authority
public io.vertx.core.http.HttpClientRequest authority(io.vertx.core.net.HostAndPort authority)
- Specified by:
authorityin interfaceio.vertx.core.http.HttpClientRequest
-
exceptionHandler
public io.vertx.core.http.HttpClientRequest exceptionHandler(io.vertx.core.Handler<Throwable> handler)
- Specified by:
exceptionHandlerin interfaceFastFailHttpClientRequest- Specified by:
exceptionHandlerin interfaceio.vertx.core.http.HttpClientRequest- Specified by:
exceptionHandlerin interfaceio.vertx.core.streams.StreamBase- Specified by:
exceptionHandlerin interfaceio.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
-
setMethod
public io.vertx.core.http.HttpClientRequest setMethod(io.vertx.core.http.HttpMethod method)
- Specified by:
setMethodin interfaceio.vertx.core.http.HttpClientRequest
-
setUri
public void setUri(String uri)
-
-