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 ClientConnection
getConnection()
ClientResponse
getContinueResponse()
ClientRequest
getRequest()
org.xnio.channels.StreamSinkChannel
getRequestChannel()
Returns the request channel that can be used to send data to the server.ClientResponse
getResponse()
org.xnio.channels.StreamSourceChannel
getResponseChannel()
Returns the response channel that can be used to read data from the target server.void
setContinueHandler(ContinueNotification continueHandler)
void
setPushHandler(PushCallback pushCallback)
void
setResponseListener(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:
setResponseListener
in interfaceClientExchange
-
setContinueHandler
public void setContinueHandler(ContinueNotification continueHandler)
- Specified by:
setContinueHandler
in interfaceClientExchange
-
setPushHandler
public void setPushHandler(PushCallback pushCallback)
- Specified by:
setPushHandler
in interfaceClientExchange
-
getRequestChannel
public org.xnio.channels.StreamSinkChannel getRequestChannel()
Description copied from interface:ClientExchange
Returns the request channel that can be used to send data to the server.- Specified by:
getRequestChannel
in interfaceClientExchange
- Returns:
- The request channel
-
getResponseChannel
public org.xnio.channels.StreamSourceChannel getResponseChannel()
Description copied from interface:ClientExchange
Returns the response channel that can be used to read data from the target server.- Specified by:
getResponseChannel
in interfaceClientExchange
- Returns:
- The response channel
-
getRequest
public ClientRequest getRequest()
- Specified by:
getRequest
in interfaceClientExchange
-
getResponse
public ClientResponse getResponse()
- Specified by:
getResponse
in interfaceClientExchange
- Returns:
- The client response, or null if it has not been received yet
-
getContinueResponse
public ClientResponse getContinueResponse()
- Specified by:
getContinueResponse
in interfaceClientExchange
- Returns:
- the result of a HTTP 100-continue response
-
getConnection
public ClientConnection getConnection()
- Specified by:
getConnection
in interfaceClientExchange
- Returns:
- The underlying connection
-
-