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 and Description
`Http2ClientExchange(ClientConnection clientConnection, Http2StreamSinkChannel request, ClientRequest clientRequest)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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 interface `ClientExchange`

#### setContinueHandler

    public void setContinueHandler(ContinueNotification continueHandler)

Specified by:
  `setContinueHandler` in interface `ClientExchange`

#### setPushHandler

    public void setPushHandler(PushCallback pushCallback)

Specified by:
  `setPushHandler` in interface `ClientExchange`

#### 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 interface `ClientExchange`
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 interface `ClientExchange`
Returns:
  The response channel

#### getRequest

    public ClientRequest getRequest()

Specified by:
  `getRequest` in interface `ClientExchange`

#### getResponse

    public ClientResponse getResponse()

Specified by:
  `getResponse` in interface `ClientExchange`
Returns:
  The client response, or null if it has not been received yet

#### getContinueResponse

    public ClientResponse getContinueResponse()

Specified by:
  `getContinueResponse` in interface `ClientExchange`
Returns:
  the result of a HTTP 100-continue response

#### getConnection

    public ClientConnection getConnection()

Specified by:
  `getConnection` in interface `ClientExchange`
Returns:
  The underlying connection