Package io.undertow.vertx
Class VertxHttpExchange
java.lang.Object
io.undertow.httpcore.HttpExchangeBase
io.undertow.vertx.VertxHttpExchange
- All Implemented Interfaces:
io.undertow.httpcore.HttpExchange,io.undertow.httpcore.InputChannel,io.undertow.httpcore.OutputChannel,io.vertx.core.Handler<io.vertx.core.buffer.Buffer>,Closeable,AutoCloseable
public class VertxHttpExchange
extends io.undertow.httpcore.HttpExchangeBase
implements io.undertow.httpcore.HttpExchange, io.undertow.httpcore.InputChannel, io.undertow.httpcore.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, io.undertow.httpcore.BufferAllocator allocator, Executor worker, Object context) VertxHttpExchange(io.vertx.core.http.HttpServerRequest request, io.undertow.httpcore.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.undertow.httpcore.BufferAllocatorio.undertow.httpcore.InputChannelio.netty.util.concurrent.EventExecutorlongio.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>longgetRequestHeader(String name) getRequestHeaders(String name) getResponseHeader(String name) getResponseHeaders(String name) io.undertow.httpcore.SSLSessionInfointio.undertow.httpcore.UndertowOptionMapvoidhandle(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<io.undertow.httpcore.InputChannel, T> handler, T context) voidsetReadTimeout(long readTimeoutMs) voidsetRequestHeader(String name, String value) voidsetResponseHeader(String name, String value) io.undertow.httpcore.HttpExchangesetStatusCode(int code) voidsetUndertowOptions(io.undertow.httpcore.UndertowOptionMap options) voidsetUpgradeListener(Consumer<Object> listener) <T> voidwriteAsync0(io.netty.buffer.ByteBuf data, boolean last, io.undertow.httpcore.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
-
VertxHttpExchange
-
-
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
public io.undertow.httpcore.BufferAllocator getBufferAllocator()- Specified by:
getBufferAllocatorin interfaceio.undertow.httpcore.HttpExchange
-
setStatusCode
public io.undertow.httpcore.HttpExchange setStatusCode(int code) - Specified by:
setStatusCodein interfaceio.undertow.httpcore.HttpExchange
-
getStatusCode
public int getStatusCode()- Specified by:
getStatusCodein interfaceio.undertow.httpcore.HttpExchange
-
getRequestHeader
- Specified by:
getRequestHeaderin interfaceio.undertow.httpcore.HttpExchange
-
getRequestHeaders
- Specified by:
getRequestHeadersin interfaceio.undertow.httpcore.HttpExchange
-
containsRequestHeader
- Specified by:
containsRequestHeaderin interfaceio.undertow.httpcore.HttpExchange
-
removeRequestHeader
- Specified by:
removeRequestHeaderin interfaceio.undertow.httpcore.HttpExchange
-
setRequestHeader
- Specified by:
setRequestHeaderin interfaceio.undertow.httpcore.HttpExchange
-
getRequestHeaderNames
- Specified by:
getRequestHeaderNamesin interfaceio.undertow.httpcore.HttpExchange
-
addRequestHeader
- Specified by:
addRequestHeaderin interfaceio.undertow.httpcore.HttpExchange
-
clearRequestHeaders
public void clearRequestHeaders()- Specified by:
clearRequestHeadersin interfaceio.undertow.httpcore.HttpExchange
-
getResponseHeaders
- Specified by:
getResponseHeadersin interfaceio.undertow.httpcore.HttpExchange
-
containsResponseHeader
- Specified by:
containsResponseHeaderin interfaceio.undertow.httpcore.HttpExchange
-
getContext
-
removeResponseHeader
- Specified by:
removeResponseHeaderin interfaceio.undertow.httpcore.HttpExchange
-
setResponseHeader
- Specified by:
setResponseHeaderin interfaceio.undertow.httpcore.HttpExchange
-
getResponseHeaderNames
- Specified by:
getResponseHeaderNamesin interfaceio.undertow.httpcore.HttpExchange
-
addResponseHeader
- Specified by:
addResponseHeaderin interfaceio.undertow.httpcore.HttpExchange
-
clearResponseHeaders
public void clearResponseHeaders()- Specified by:
clearResponseHeadersin interfaceio.undertow.httpcore.HttpExchange
-
getResponseHeader
- Specified by:
getResponseHeaderin interfaceio.undertow.httpcore.HttpExchange
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceio.undertow.httpcore.HttpExchange
-
getRequestScheme
- Specified by:
getRequestSchemein interfaceio.undertow.httpcore.HttpExchange
-
getRequestURI
- Specified by:
getRequestURIin interfaceio.undertow.httpcore.HttpExchange
-
getProtocol
- Specified by:
getProtocolin interfaceio.undertow.httpcore.HttpExchange
-
isInIoThread
public boolean isInIoThread()- Specified by:
isInIoThreadin interfaceio.undertow.httpcore.HttpExchange
-
isHttp2
public boolean isHttp2()- Specified by:
isHttp2in interfaceio.undertow.httpcore.HttpExchange
-
getInputChannel
public io.undertow.httpcore.InputChannel getInputChannel()- Specified by:
getInputChannelin interfaceio.undertow.httpcore.HttpExchange
-
getDestinationAddress
- Specified by:
getDestinationAddressin interfaceio.undertow.httpcore.HttpExchange
-
getSourceAddress
- Specified by:
getSourceAddressin interfaceio.undertow.httpcore.HttpExchange
-
readAsync
- Specified by:
readAsyncin interfaceio.undertow.httpcore.InputChannel- Throws:
IOException
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceio.undertow.httpcore.InputChannel
-
setReadHandler
- Specified by:
setReadHandlerin interfaceio.undertow.httpcore.InputChannel
-
readBytesAvailable
public int readBytesAvailable()- Specified by:
readBytesAvailablein interfaceio.undertow.httpcore.InputChannel
-
readBlocking
- Specified by:
readBlockingin interfaceio.undertow.httpcore.InputChannel- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceio.undertow.httpcore.HttpExchange
-
getIoThread
public io.netty.util.concurrent.EventExecutor getIoThread()- Specified by:
getIoThreadin interfaceio.undertow.httpcore.HttpExchange
-
writeBlocking0
- Specified by:
writeBlocking0in classio.undertow.httpcore.HttpExchangeBase- Throws:
IOException
-
writeAsync0
public <T> void writeAsync0(io.netty.buffer.ByteBuf data, boolean last, io.undertow.httpcore.IoCallback<T> callback, T context) - Specified by:
writeAsync0in classio.undertow.httpcore.HttpExchangeBase
-
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 interfaceio.undertow.httpcore.HttpExchange
-
getUndertowOptions
public io.undertow.httpcore.UndertowOptionMap getUndertowOptions()- Specified by:
getUndertowOptionsin interfaceio.undertow.httpcore.HttpExchange
-
setUndertowOptions
public void setUndertowOptions(io.undertow.httpcore.UndertowOptionMap options) - Specified by:
setUndertowOptionsin interfaceio.undertow.httpcore.HttpExchange
-
sendContinue
public void sendContinue()- Specified by:
sendContinuein interfaceio.undertow.httpcore.HttpExchange
-
discardRequest
public void discardRequest()- Specified by:
discardRequestin interfaceio.undertow.httpcore.HttpExchange
-
isUpgradeSupported
public boolean isUpgradeSupported()- Specified by:
isUpgradeSupportedin interfaceio.undertow.httpcore.HttpExchange
-
getSslSessionInfo
public io.undertow.httpcore.SSLSessionInfo getSslSessionInfo()- Specified by:
getSslSessionInfoin interfaceio.undertow.httpcore.HttpExchange
-
isPushSupported
public boolean isPushSupported()- Specified by:
isPushSupportedin interfaceio.undertow.httpcore.HttpExchange
-
pushResource
- Specified by:
pushResourcein interfaceio.undertow.httpcore.HttpExchange
-
isIoOperationQueued
public boolean isIoOperationQueued()- Specified by:
isIoOperationQueuedin interfaceio.undertow.httpcore.HttpExchange
-
setMaxEntitySize
public void setMaxEntitySize(long maxEntitySize) - Specified by:
setMaxEntitySizein interfaceio.undertow.httpcore.HttpExchange
-
getMaxEntitySize
public long getMaxEntitySize()- Specified by:
getMaxEntitySizein interfaceio.undertow.httpcore.HttpExchange
-
setReadTimeout
public void setReadTimeout(long readTimeoutMs) - Specified by:
setReadTimeoutin interfaceio.undertow.httpcore.HttpExchange
-
getReadTimeout
public long getReadTimeout()- Specified by:
getReadTimeoutin interfaceio.undertow.httpcore.HttpExchange
-
setUpgradeListener
- Specified by:
setUpgradeListenerin interfaceio.undertow.httpcore.HttpExchange
-