Package io.undertow.client.http2
Class Http2ClientExchange
- java.lang.Object
-
- io.undertow.util.AbstractAttachable
-
- io.undertow.client.http2.Http2ClientExchange
-
- All Implemented Interfaces:
ClientExchange,Attachable
public class Http2ClientExchange extends AbstractAttachable implements ClientExchange
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description Http2ClientExchange(ClientConnection clientConnection, Http2StreamSinkChannel request, ClientRequest clientRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientConnectiongetConnection()ClientResponsegetContinueResponse()ClientRequestgetRequest()org.xnio.channels.StreamSinkChannelgetRequestChannel()Returns the request channel that can be used to send data to the server.ClientResponsegetResponse()org.xnio.channels.StreamSourceChannelgetResponseChannel()Returns the response channel that can be used to read data from the target server.voidsetContinueHandler(ContinueNotification continueHandler)voidsetPushHandler(PushCallback pushCallback)voidsetResponseListener(ClientCallback<ClientExchange> responseListener)-
Methods inherited from class io.undertow.util.AbstractAttachable
addToAttachmentList, createAttachmentMap, getAttachment, getAttachmentList, putAttachment, removeAttachment
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.undertow.util.Attachable
addToAttachmentList, getAttachment, getAttachmentList, putAttachment, removeAttachment
-
-
-
-
Constructor Detail
-
Http2ClientExchange
public Http2ClientExchange(ClientConnection clientConnection, Http2StreamSinkChannel request, ClientRequest clientRequest)
-
-
Method Detail
-
setResponseListener
public void setResponseListener(ClientCallback<ClientExchange> responseListener)
- Specified by:
setResponseListenerin interfaceClientExchange
-
setContinueHandler
public void setContinueHandler(ContinueNotification continueHandler)
- Specified by:
setContinueHandlerin interfaceClientExchange
-
setPushHandler
public void setPushHandler(PushCallback pushCallback)
- Specified by:
setPushHandlerin interfaceClientExchange
-
getRequestChannel
public org.xnio.channels.StreamSinkChannel getRequestChannel()
Description copied from interface:ClientExchangeReturns the request channel that can be used to send data to the server.- Specified by:
getRequestChannelin interfaceClientExchange- Returns:
- The request channel
-
getResponseChannel
public org.xnio.channels.StreamSourceChannel getResponseChannel()
Description copied from interface:ClientExchangeReturns the response channel that can be used to read data from the target server.- Specified by:
getResponseChannelin interfaceClientExchange- Returns:
- The response channel
-
getRequest
public ClientRequest getRequest()
- Specified by:
getRequestin interfaceClientExchange
-
getResponse
public ClientResponse getResponse()
- Specified by:
getResponsein interfaceClientExchange- Returns:
- The client response, or null if it has not been received yet
-
getContinueResponse
public ClientResponse getContinueResponse()
- Specified by:
getContinueResponsein interfaceClientExchange- Returns:
- the result of a HTTP 100-continue response
-
getConnection
public ClientConnection getConnection()
- Specified by:
getConnectionin interfaceClientExchange- Returns:
- The underlying connection
-
-