AttachableAjpServerConnection, HttpServerConnectionpublic abstract class AbstractServerConnection extends ServerConnection
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AbstractServerConnection.ConduitState |
ServerConnection.CloseListener| Modifier and Type | Field | Description |
|---|---|---|
protected ByteBufferPool |
bufferPool |
|
protected org.xnio.StreamConnection |
channel |
|
protected List<ServerConnection.CloseListener> |
closeListeners |
|
protected io.undertow.server.AbstractServerConnection.CloseSetter |
closeSetter |
|
protected HttpServerExchange |
current |
|
protected PooledByteBuffer |
extraBytes |
Any extra bytes that were read from the channel.
|
protected org.xnio.conduits.StreamSinkConduit |
originalSinkConduit |
|
protected org.xnio.conduits.StreamSourceConduit |
originalSourceConduit |
|
protected HttpHandler |
rootHandler |
|
protected org.xnio.OptionMap |
undertowOptions |
| Constructor | Description |
|---|---|
AbstractServerConnection(org.xnio.StreamConnection channel,
ByteBufferPool bufferPool,
HttpHandler rootHandler,
org.xnio.OptionMap undertowOptions,
int bufferSize) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCloseListener(ServerConnection.CloseListener listener) |
Adds a close listener, than will be invoked with the connection is closed
|
void |
clearChannel() |
Resets the channel to its original state, effectively disabling all current conduit
wrappers.
|
void |
close() |
|
org.xnio.Pool<ByteBuffer> |
getBufferPool() |
|
int |
getBufferSize() |
|
ByteBufferPool |
getByteBufferPool() |
Get the buffer pool for this connection.
|
org.xnio.StreamConnection |
getChannel() |
Get the underlying channel.
|
org.xnio.ChannelListener.Setter<ServerConnection> |
getCloseSetter() |
|
PooledByteBuffer |
getExtraBytes() |
|
org.xnio.XnioIoThread |
getIoThread() |
|
SocketAddress |
getLocalAddress() |
|
<A extends SocketAddress> |
getLocalAddress(Class<A> type) |
|
<T> T |
getOption(org.xnio.Option<T> option) |
|
org.xnio.conduits.StreamSinkConduit |
getOriginalSinkConduit() |
|
org.xnio.conduits.StreamSourceConduit |
getOriginalSourceConduit() |
|
SocketAddress |
getPeerAddress() |
Returns the actual address of the remote connection.
|
<A extends SocketAddress> |
getPeerAddress(Class<A> type) |
Returns the actual address of the remote connection.
|
HttpHandler |
getRootHandler() |
Get the root HTTP handler for this connection.
|
protected org.xnio.conduits.ConduitStreamSinkChannel |
getSinkChannel() |
|
protected org.xnio.conduits.ConduitStreamSourceChannel |
getSourceChannel() |
|
org.xnio.OptionMap |
getUndertowOptions() |
|
org.xnio.XnioWorker |
getWorker() |
|
boolean |
isOpen() |
|
protected void |
maxEntitySizeUpdated(HttpServerExchange exchange) |
Callback that is invoked if the max entity size is updated.
|
AbstractServerConnection.ConduitState |
resetChannel() |
Resets the channel to its original state, effectively disabling all current conduit
wrappers.
|
void |
restoreChannel(AbstractServerConnection.ConduitState state) |
Restores the channel conduits to a previous state.
|
void |
setExtraBytes(PooledByteBuffer extraBytes) |
|
<T> T |
setOption(org.xnio.Option<T> option,
T value) |
|
protected void |
setUpgradeListener(HttpUpgradeListener upgradeListener) |
|
protected static org.xnio.conduits.StreamSinkConduit |
sink(AbstractServerConnection.ConduitState state) |
|
protected static org.xnio.conduits.StreamSourceConduit |
source(AbstractServerConnection.ConduitState state) |
|
boolean |
supportsOption(org.xnio.Option<?> option) |
addToAttachmentList, createAttachmentMap, getAttachment, getAttachmentList, putAttachment, removeAttachmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexchangeComplete, getSinkConduit, getSslSession, getSslSessionInfo, getTransportProtocol, isConnectSupported, isContinueResponseSupported, isPushSupported, isUpgradeSupported, pushResource, pushResource, sendOutOfBandResponse, setConnectListener, setSslSessionInfo, terminateRequestChannel, upgradeChannelprotected final org.xnio.StreamConnection channel
protected final io.undertow.server.AbstractServerConnection.CloseSetter closeSetter
protected final ByteBufferPool bufferPool
protected final HttpHandler rootHandler
protected final org.xnio.OptionMap undertowOptions
protected final org.xnio.conduits.StreamSourceConduit originalSourceConduit
protected final org.xnio.conduits.StreamSinkConduit originalSinkConduit
protected final List<ServerConnection.CloseListener> closeListeners
protected HttpServerExchange current
protected PooledByteBuffer extraBytes
public AbstractServerConnection(org.xnio.StreamConnection channel,
ByteBufferPool bufferPool,
HttpHandler rootHandler,
org.xnio.OptionMap undertowOptions,
int bufferSize)
public org.xnio.Pool<ByteBuffer> getBufferPool()
getBufferPool in class ServerConnectionpublic HttpHandler getRootHandler()
public ByteBufferPool getByteBufferPool()
getByteBufferPool in class ServerConnectionpublic org.xnio.StreamConnection getChannel()
public org.xnio.ChannelListener.Setter<ServerConnection> getCloseSetter()
public org.xnio.XnioWorker getWorker()
getWorker in class ServerConnectionpublic org.xnio.XnioIoThread getIoThread()
getIoThread in class ServerConnectionpublic boolean isOpen()
isOpen in class ServerConnectionpublic boolean supportsOption(org.xnio.Option<?> option)
supportsOption in class ServerConnectionpublic <T> T getOption(org.xnio.Option<T> option)
throws IOException
getOption in class ServerConnectionIOExceptionpublic <T> T setOption(org.xnio.Option<T> option,
T value)
throws IllegalArgumentException,
IOException
setOption in class ServerConnectionIllegalArgumentExceptionIOExceptionpublic void close()
throws IOException
close in class ServerConnectionIOExceptionpublic SocketAddress getPeerAddress()
ServerConnectiongetPeerAddress in class ServerConnectionpublic <A extends SocketAddress> A getPeerAddress(Class<A> type)
ServerConnectiongetPeerAddress in class ServerConnectionA - The address typetype - The type of address to returnpublic SocketAddress getLocalAddress()
getLocalAddress in class ServerConnectionpublic <A extends SocketAddress> A getLocalAddress(Class<A> type)
getLocalAddress in class ServerConnectionpublic org.xnio.OptionMap getUndertowOptions()
getUndertowOptions in class ServerConnectionpublic int getBufferSize()
getBufferSize in class ServerConnectionpublic PooledByteBuffer getExtraBytes()
public void setExtraBytes(PooledByteBuffer extraBytes)
public org.xnio.conduits.StreamSourceConduit getOriginalSourceConduit()
public org.xnio.conduits.StreamSinkConduit getOriginalSinkConduit()
public AbstractServerConnection.ConduitState resetChannel()
AbstractServerConnection.ConduitState object that
can be used the restore the channel.public void clearChannel()
public void restoreChannel(AbstractServerConnection.ConduitState state)
state - The original stateresetChannel()protected static org.xnio.conduits.StreamSinkConduit sink(AbstractServerConnection.ConduitState state)
protected static org.xnio.conduits.StreamSourceConduit source(AbstractServerConnection.ConduitState state)
public void addCloseListener(ServerConnection.CloseListener listener)
ServerConnectionaddCloseListener in class ServerConnectionlistener - The close listenerprotected org.xnio.conduits.ConduitStreamSinkChannel getSinkChannel()
getSinkChannel in class ServerConnectionprotected org.xnio.conduits.ConduitStreamSourceChannel getSourceChannel()
getSourceChannel in class ServerConnectionprotected void setUpgradeListener(HttpUpgradeListener upgradeListener)
setUpgradeListener in class ServerConnectionprotected void maxEntitySizeUpdated(HttpServerExchange exchange)
ServerConnectionmaxEntitySizeUpdated in class ServerConnectionexchange - The current exchangeCopyright © 2018. All rights reserved.