public abstract class ServerConnection extends AbstractAttachable implements org.xnio.channels.ConnectedChannel
Modifier and Type | Class and Description |
---|---|
static interface |
ServerConnection.CloseListener |
Constructor and Description |
---|
ServerConnection() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addCloseListener(ServerConnection.CloseListener listener)
Adds a close listener, than will be invoked with the connection is closed
|
abstract void |
close() |
protected abstract void |
exchangeComplete(HttpServerExchange exchange)
Invoked when the exchange is complete.
|
abstract org.xnio.Pool<ByteBuffer> |
getBufferPool() |
abstract int |
getBufferSize() |
abstract org.xnio.XnioIoThread |
getIoThread() |
abstract SocketAddress |
getLocalAddress() |
abstract <A extends SocketAddress> |
getLocalAddress(Class<A> type) |
abstract <T> T |
getOption(org.xnio.Option<T> option) |
abstract SocketAddress |
getPeerAddress()
Returns the actual address of the remote connection.
|
abstract <A extends SocketAddress> |
getPeerAddress(Class<A> type)
Returns the actual address of the remote connection.
|
protected abstract org.xnio.conduits.ConduitStreamSinkChannel |
getSinkChannel() |
protected abstract org.xnio.conduits.StreamSinkConduit |
getSinkConduit(HttpServerExchange exchange,
org.xnio.conduits.StreamSinkConduit conduit)
Gets the sink conduit that should be used for this request.
|
protected abstract org.xnio.conduits.ConduitStreamSourceChannel |
getSourceChannel() |
abstract SSLSessionInfo |
getSslSessionInfo()
Gets SSL information about the connection.
|
abstract org.xnio.OptionMap |
getUndertowOptions() |
abstract org.xnio.XnioWorker |
getWorker() |
abstract boolean |
isOpen() |
protected abstract boolean |
isUpgradeSupported() |
abstract HttpServerExchange |
sendOutOfBandResponse(HttpServerExchange exchange)
Sends an out of band response, such as a HTTP 100-continue response.
|
abstract <T> T |
setOption(org.xnio.Option<T> option,
T value) |
abstract void |
setSslSessionInfo(SSLSessionInfo sessionInfo)
Sets the current SSL information.
|
protected abstract void |
setUpgradeListener(HttpUpgradeListener upgradeListener) |
abstract boolean |
supportsOption(org.xnio.Option<?> option) |
protected abstract org.xnio.StreamConnection |
upgradeChannel()
Upgrade the connection, if allowed
|
addToAttachmentList, getAttachment, getAttachmentList, putAttachment, removeAttachment
public abstract org.xnio.Pool<ByteBuffer> getBufferPool()
public abstract org.xnio.XnioWorker getWorker()
getWorker
in interface org.xnio.channels.CloseableChannel
public abstract org.xnio.XnioIoThread getIoThread()
getIoThread
in interface org.xnio.channels.CloseableChannel
public abstract HttpServerExchange sendOutOfBandResponse(HttpServerExchange exchange)
exchange
- The current exchangepublic abstract boolean isOpen()
public abstract boolean supportsOption(org.xnio.Option<?> option)
supportsOption
in interface org.xnio.channels.Configurable
public abstract <T> T getOption(org.xnio.Option<T> option) throws IOException
getOption
in interface org.xnio.channels.Configurable
IOException
public abstract <T> T setOption(org.xnio.Option<T> option, T value) throws IllegalArgumentException, IOException
setOption
in interface org.xnio.channels.Configurable
IllegalArgumentException
IOException
public abstract void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in interface InterruptibleChannel
close
in interface org.xnio.channels.CloseableChannel
IOException
public abstract SocketAddress getPeerAddress()
getPeerAddress
in interface org.xnio.channels.ConnectedChannel
public abstract <A extends SocketAddress> A getPeerAddress(Class<A> type)
getPeerAddress
in interface org.xnio.channels.ConnectedChannel
A
- The address typetype
- The type of address to returnpublic abstract SocketAddress getLocalAddress()
getLocalAddress
in interface org.xnio.channels.BoundChannel
public abstract <A extends SocketAddress> A getLocalAddress(Class<A> type)
getLocalAddress
in interface org.xnio.channels.BoundChannel
public abstract org.xnio.OptionMap getUndertowOptions()
public abstract int getBufferSize()
public abstract SSLSessionInfo getSslSessionInfo()
public abstract void setSslSessionInfo(SSLSessionInfo sessionInfo)
sessionInfo
- The ssl session informationpublic abstract void addCloseListener(ServerConnection.CloseListener listener)
listener
- The close listenerprotected abstract org.xnio.StreamConnection upgradeChannel()
protected abstract org.xnio.conduits.ConduitStreamSinkChannel getSinkChannel()
protected abstract org.xnio.conduits.ConduitStreamSourceChannel getSourceChannel()
protected abstract org.xnio.conduits.StreamSinkConduit getSinkConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSinkConduit conduit)
protected abstract boolean isUpgradeSupported()
protected abstract void exchangeComplete(HttpServerExchange exchange)
protected abstract void setUpgradeListener(HttpUpgradeListener upgradeListener)
Copyright © 2014 JBoss by Red Hat. All rights reserved.