Package io.undertow.vertx
Class VertxHttpExchange
java.lang.Object
io.undertow.httpcore.HttpExchangeBase
io.undertow.vertx.VertxHttpExchange
- All Implemented Interfaces:
HttpExchange,InputChannel,OutputChannel,io.vertx.core.Handler<io.vertx.core.buffer.Buffer>,Closeable,AutoCloseable
public class VertxHttpExchange
extends HttpExchangeBase
implements HttpExchange, InputChannel, OutputChannel, io.vertx.core.Handler<io.vertx.core.buffer.Buffer>
-
Field Summary
Fields inherited from class io.undertow.httpcore.HttpExchangeBase
preCommitListener -
Constructor Summary
ConstructorsConstructorDescriptionVertxHttpExchange(io.vertx.core.http.HttpServerRequest request, BufferAllocator allocator, Executor worker, Object context) VertxHttpExchange(io.vertx.core.http.HttpServerRequest request, BufferAllocator allocator, Executor worker, Object context, io.vertx.core.buffer.Buffer existingBody) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestHeader(String name, String value) voidaddResponseHeader(String name, String value) voidvoidvoidclose()booleancontainsRequestHeader(String name) booleancontainsResponseHeader(String name) voidio.netty.util.concurrent.EventExecutorlongio.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>longgetRequestHeader(String name) getRequestHeaders(String name) getResponseHeader(String name) getResponseHeaders(String name) intvoidhandle(io.vertx.core.buffer.Buffer event) booleanisHttp2()booleanbooleanbooleanbooleanbooleanvoidio.netty.buffer.ByteBufio.netty.buffer.ByteBufintvoidremoveRequestHeader(String name) voidremoveResponseHeader(String name) voidvoidsetMaxEntitySize(long maxEntitySize) setPushHandler(io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest> pushHandler) <T> voidsetReadHandler(BiConsumer<InputChannel, T> handler, T context) voidsetReadTimeout(long readTimeoutMs) voidsetRequestHeader(String name, String value) voidsetResponseHeader(String name, String value) setStatusCode(int code) voidsetUndertowOptions(UndertowOptionMap options) voidsetUpgradeListener(Consumer<Object> listener) <T> voidwriteAsync0(io.netty.buffer.ByteBuf data, boolean last, IoCallback<T> callback, T context) voidwriteBlocking0(io.netty.buffer.ByteBuf data, boolean last) Methods inherited from class io.undertow.httpcore.HttpExchangeBase
addWriteFunction, endExchange, getInputStream, getOutputChannel, getOutputStream, getResponseBytesSent, isComplete, isRequestComplete, isRequestEntityBodyAllowed, isResponseComplete, isResponseEntityBodyAllowed, isResponseStarted, setBlockingHttpExchange, setCompletedListener, setPreCommitListener, terminateRequest, terminateResponse, writeAsync, writeAsync, writeAsync, writeAsync, writeBlockingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.undertow.httpcore.HttpExchange
addWriteFunction, endExchange, getInputStream, getOutputChannel, getOutputStream, getRequestContentLength, getResponseBytesSent, getResponseContentLength, isComplete, isRequestComplete, isRequestTrailerFieldsSupported, isResponseComplete, isUpgrade, setBlockingHttpExchange, setCompletedListener, setPreCommitListenerMethods inherited from interface io.undertow.httpcore.OutputChannel
writeAsync, writeAsync, writeAsync, writeAsync, writeBlocking
-
Constructor Details
-
VertxHttpExchange
public VertxHttpExchange(io.vertx.core.http.HttpServerRequest request, BufferAllocator allocator, Executor worker, Object context) -
VertxHttpExchange
public VertxHttpExchange(io.vertx.core.http.HttpServerRequest request, BufferAllocator allocator, Executor worker, Object context, io.vertx.core.buffer.Buffer existingBody)
-
-
Method Details
-
getPushHandler
public io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest> getPushHandler() -
setPushHandler
public VertxHttpExchange setPushHandler(io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest> pushHandler) -
getBufferAllocator
- Specified by:
getBufferAllocatorin interfaceHttpExchange
-
setStatusCode
- Specified by:
setStatusCodein interfaceHttpExchange
-
getStatusCode
public int getStatusCode()- Specified by:
getStatusCodein interfaceHttpExchange
-
getRequestHeader
- Specified by:
getRequestHeaderin interfaceHttpExchange
-
getRequestHeaders
- Specified by:
getRequestHeadersin interfaceHttpExchange
-
containsRequestHeader
- Specified by:
containsRequestHeaderin interfaceHttpExchange
-
removeRequestHeader
- Specified by:
removeRequestHeaderin interfaceHttpExchange
-
setRequestHeader
- Specified by:
setRequestHeaderin interfaceHttpExchange
-
getRequestHeaderNames
- Specified by:
getRequestHeaderNamesin interfaceHttpExchange
-
addRequestHeader
- Specified by:
addRequestHeaderin interfaceHttpExchange
-
clearRequestHeaders
public void clearRequestHeaders()- Specified by:
clearRequestHeadersin interfaceHttpExchange
-
getResponseHeaders
- Specified by:
getResponseHeadersin interfaceHttpExchange
-
containsResponseHeader
- Specified by:
containsResponseHeaderin interfaceHttpExchange
-
getContext
-
removeResponseHeader
- Specified by:
removeResponseHeaderin interfaceHttpExchange
-
setResponseHeader
- Specified by:
setResponseHeaderin interfaceHttpExchange
-
getResponseHeaderNames
- Specified by:
getResponseHeaderNamesin interfaceHttpExchange
-
addResponseHeader
- Specified by:
addResponseHeaderin interfaceHttpExchange
-
clearResponseHeaders
public void clearResponseHeaders()- Specified by:
clearResponseHeadersin interfaceHttpExchange
-
getResponseHeader
- Specified by:
getResponseHeaderin interfaceHttpExchange
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceHttpExchange
-
getRequestScheme
- Specified by:
getRequestSchemein interfaceHttpExchange
-
getRequestURI
- Specified by:
getRequestURIin interfaceHttpExchange
-
getProtocol
- Specified by:
getProtocolin interfaceHttpExchange
-
isInIoThread
public boolean isInIoThread()- Specified by:
isInIoThreadin interfaceHttpExchange
-
isHttp2
public boolean isHttp2()- Specified by:
isHttp2in interfaceHttpExchange
-
getInputChannel
- Specified by:
getInputChannelin interfaceHttpExchange
-
getDestinationAddress
- Specified by:
getDestinationAddressin interfaceHttpExchange
-
getSourceAddress
- Specified by:
getSourceAddressin interfaceHttpExchange
-
readAsync
- Specified by:
readAsyncin interfaceInputChannel- Throws:
IOException
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceInputChannel
-
setReadHandler
- Specified by:
setReadHandlerin interfaceInputChannel
-
readBytesAvailable
public int readBytesAvailable()- Specified by:
readBytesAvailablein interfaceInputChannel
-
readBlocking
- Specified by:
readBlockingin interfaceInputChannel- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpExchange
-
getIoThread
public io.netty.util.concurrent.EventExecutor getIoThread()- Specified by:
getIoThreadin interfaceHttpExchange
-
writeBlocking0
- Specified by:
writeBlocking0in classHttpExchangeBase- Throws:
IOException
-
writeAsync0
public <T> void writeAsync0(io.netty.buffer.ByteBuf data, boolean last, IoCallback<T> callback, T context) - Specified by:
writeAsync0in classHttpExchangeBase
-
handle
public void handle(io.vertx.core.buffer.Buffer event) - Specified by:
handlein interfaceio.vertx.core.Handler<io.vertx.core.buffer.Buffer>
-
getWorker
- Specified by:
getWorkerin interfaceHttpExchange
-
getUndertowOptions
- Specified by:
getUndertowOptionsin interfaceHttpExchange
-
setUndertowOptions
- Specified by:
setUndertowOptionsin interfaceHttpExchange
-
sendContinue
public void sendContinue()- Specified by:
sendContinuein interfaceHttpExchange
-
discardRequest
public void discardRequest()- Specified by:
discardRequestin interfaceHttpExchange
-
isUpgradeSupported
public boolean isUpgradeSupported()- Specified by:
isUpgradeSupportedin interfaceHttpExchange
-
getSslSessionInfo
- Specified by:
getSslSessionInfoin interfaceHttpExchange
-
isPushSupported
public boolean isPushSupported()- Specified by:
isPushSupportedin interfaceHttpExchange
-
pushResource
- Specified by:
pushResourcein interfaceHttpExchange
-
isIoOperationQueued
public boolean isIoOperationQueued()- Specified by:
isIoOperationQueuedin interfaceHttpExchange
-
setMaxEntitySize
public void setMaxEntitySize(long maxEntitySize) - Specified by:
setMaxEntitySizein interfaceHttpExchange
-
getMaxEntitySize
public long getMaxEntitySize()- Specified by:
getMaxEntitySizein interfaceHttpExchange
-
setReadTimeout
public void setReadTimeout(long readTimeoutMs) - Specified by:
setReadTimeoutin interfaceHttpExchange
-
getReadTimeout
public long getReadTimeout()- Specified by:
getReadTimeoutin interfaceHttpExchange
-
setUpgradeListener
- Specified by:
setUpgradeListenerin interfaceHttpExchange
-