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 | Interface and Description |
---|---|
static interface |
ClientConnection.PingListener |
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()
void addCloseListener(ChannelListener<ClientConnection> listener)
listener
- The close listenerdefault boolean isPingSupported()
true
if the underlying protocol supports sending a pingdefault void sendPing(ClientConnection.PingListener listener, long timeout, TimeUnit timeUnit)
Copyright © 2021 JBoss by Red Hat. All rights reserved.