public class HttpClientConnection extends AbstractAttachable implements Closeable, ClientConnection
| Modifier and Type | Field and Description |
|---|---|
ConduitListener<org.xnio.conduits.StreamSinkConduit> |
requestFinishListener |
ConduitListener<org.xnio.conduits.StreamSourceConduit> |
responseFinishedListener |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.xnio.Pool<ByteBuffer> |
getBufferPool() |
org.xnio.ChannelListener.Setter<? extends HttpClientConnection> |
getCloseSetter() |
org.xnio.XnioIoThread |
getIoThread() |
SocketAddress |
getLocalAddress() |
<A extends SocketAddress> |
getLocalAddress(Class<A> type) |
<T> T |
getOption(org.xnio.Option<T> option) |
SocketAddress |
getPeerAddress() |
<A extends SocketAddress> |
getPeerAddress(Class<A> type) |
org.xnio.XnioWorker |
getWorker() |
boolean |
isOpen() |
boolean |
isUpgraded() |
org.xnio.StreamConnection |
performUpgrade()
Upgrade the connection, if the underlying protocol supports it.
|
void |
requestDone()
Notification that the current request is finished
|
void |
sendRequest(ClientRequest request,
ClientCallback<ClientExchange> clientCallback)
Sends a client request.
|
<T> T |
setOption(org.xnio.Option<T> option,
T value) |
boolean |
supportsOption(org.xnio.Option<?> option) |
addToAttachmentList, getAttachment, getAttachmentList, putAttachment, removeAttachmentpublic final ConduitListener<org.xnio.conduits.StreamSinkConduit> requestFinishListener
public final ConduitListener<org.xnio.conduits.StreamSourceConduit> responseFinishedListener
public org.xnio.Pool<ByteBuffer> getBufferPool()
getBufferPool in interface ClientConnectionpublic SocketAddress getPeerAddress()
getPeerAddress in interface ClientConnectionpublic <A extends SocketAddress> A getPeerAddress(Class<A> type)
getPeerAddress in interface ClientConnectionpublic org.xnio.ChannelListener.Setter<? extends HttpClientConnection> getCloseSetter()
getCloseSetter in interface ClientConnectionpublic SocketAddress getLocalAddress()
getLocalAddress in interface ClientConnectionpublic <A extends SocketAddress> A getLocalAddress(Class<A> type)
getLocalAddress in interface ClientConnectionpublic org.xnio.XnioWorker getWorker()
getWorker in interface ClientConnectionpublic org.xnio.XnioIoThread getIoThread()
getIoThread in interface ClientConnectionpublic boolean isOpen()
isOpen in interface ClientConnectionisOpen in interface Channelpublic boolean supportsOption(org.xnio.Option<?> option)
supportsOption in interface ClientConnectionpublic <T> T getOption(org.xnio.Option<T> option)
throws IOException
getOption in interface ClientConnectionIOExceptionpublic <T> T setOption(org.xnio.Option<T> option,
T value)
throws IllegalArgumentException,
IOException
setOption in interface ClientConnectionIllegalArgumentExceptionIOExceptionpublic boolean isUpgraded()
isUpgraded in interface ClientConnectionpublic void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback)
ClientConnectionclientCallback
is invoked to provide the caller with the ClientExchange
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.sendRequest in interface ClientConnectionrequest - The request to send.public org.xnio.StreamConnection performUpgrade()
throws IOException
ClientConnectionperformUpgrade in interface ClientConnectionIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic void requestDone()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.