io.undertow.websockets.spi

## Class BlockingWebSocketHttpServerExchange

- java.lang.Object
- - io.undertow.websockets.spi.AsyncWebSocketHttpServerExchange
  - - io.undertow.websockets.spi.BlockingWebSocketHttpServerExchange

All Implemented Interfaces:
  WebSocketHttpExchange, Closeable, AutoCloseable

    public class BlockingWebSocketHttpServerExchange
    extends AsyncWebSocketHttpServerExchange

Author:
  Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`BlockingWebSocketHttpServerExchange(HttpServerExchange exchange, Set<WebSocketChannel> peerConnections)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.xnio.IoFuture<byte[]>` `readRequestData()` Gets the body of the request.
`org.xnio.IoFuture<Void>` `sendData(ByteBuffer data)` Send some data

### Methods inherited from class io.undertow.websockets.spi.AsyncWebSocketHttpServerExchange

`close, endExchange, getAttachment, getBufferPool, getOptions, getPeerConnections, getQueryString, getRequestHeader, getRequestHeaders, getRequestParameters, getRequestScheme, getRequestURI, getResponseHeader, getResponseHeaders, getSession, getUserPrincipal, isUserInRole, putAttachment, setResponseHeader, setResponseHeaders, upgradeChannel`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BlockingWebSocketHttpServerExchange

    public BlockingWebSocketHttpServerExchange(HttpServerExchange exchange,
                                               Set<WebSocketChannel> peerConnections)

### Method Detail

#### sendData

    public org.xnio.IoFuture<Void> sendData(ByteBuffer data)

Description copied from interface: `WebSocketHttpExchange`
Send some data

Specified by:
  `sendData` in interface `WebSocketHttpExchange`
Overrides:
  `sendData` in class `AsyncWebSocketHttpServerExchange`
Parameters:
  `data` - The data

#### readRequestData

    public org.xnio.IoFuture<byte[]> readRequestData()

Description copied from interface: `WebSocketHttpExchange`
Gets the body of the request.

Specified by:
  `readRequestData` in interface `WebSocketHttpExchange`
Overrides:
  `readRequestData` in class `AsyncWebSocketHttpServerExchange`