public interface ClientConnection extends Channel
In general these objects are not thread safe, they should only be used by the IO thread that is responsible for the connection. As a result this client does not provide a mechanism to perform blocking IO, it is designed for async operation only.
Modifier and Type | Method and Description |
---|---|
ByteBufferPool |
getBufferPool() |
ChannelListener.Setter<? extends ClientConnection> |
getCloseSetter() |
XnioIoThread |
getIoThread() |
SocketAddress |
getLocalAddress() |
<A extends SocketAddress> |
getLocalAddress(Class<A> type) |
<T> T |
getOption(Option<T> option) |
SocketAddress |
getPeerAddress() |
<A extends SocketAddress> |
getPeerAddress(Class<A> type) |
ClientStatistics |
getStatistics() |
XnioWorker |
getWorker() |
boolean |
isMultiplexingSupported() |
boolean |
isOpen() |
boolean |
isPushSupported() |
boolean |
isUpgraded() |
boolean |
isUpgradeSupported() |
StreamConnection |
performUpgrade()
Upgrade the connection, if the underlying protocol supports it.
|
void |
sendRequest(ClientRequest request,
ClientCallback<ClientExchange> clientCallback)
Sends a client request.
|
<T> T |
setOption(Option<T> option,
T value) |
boolean |
supportsOption(Option<?> option) |
void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback)
Request objects can be queued. Once the request is in a state that it is ready to be sent the clientCallback
is invoked to provide the caller with the ClientExchange
If isMultiplexingSupported()
returns true then multiple requests may be active at the same time, and a later
request may complete before an earlier one.
Note that the request header may not be written out until after the callback has been invoked. This allows the client to write out a header with a gathering write if the request contains content.
request
- The request to send.StreamConnection performUpgrade() throws IOException
IOException
ByteBufferPool getBufferPool()
SocketAddress getPeerAddress()
<A extends SocketAddress> A getPeerAddress(Class<A> type)
ChannelListener.Setter<? extends ClientConnection> getCloseSetter()
SocketAddress getLocalAddress()
<A extends SocketAddress> A getLocalAddress(Class<A> type)
XnioWorker getWorker()
XnioIoThread getIoThread()
boolean supportsOption(Option<?> option)
<T> T getOption(Option<T> option) throws IOException
IOException
<T> T setOption(Option<T> option, T value) throws IllegalArgumentException, IOException
IllegalArgumentException
IOException
boolean isUpgraded()
boolean isPushSupported()
true
if this connection support server pushboolean isMultiplexingSupported()
true
if this client supports multiplexingClientStatistics getStatistics()
null
if statistics are not supported or disabledboolean isUpgradeSupported()
Copyright © 2016 JBoss by Red Hat. All rights reserved.