io.undertow.client.UndertowClient .
Requires Undertow 1.3 or 1.4, including XNIO, as of Spring Framework 5.0.
When used for testing purposes (e.g. load testing) or for specific use cases (like HTTPS configuration), a custom OptionMap should be provided:
OptionMap optionMap = OptionMap.builder() .set(Options.WORKER_IO_THREADS, 8) .set(Options.TCP_NODELAY, true) .set(Options.KEEP_ALIVE, true) .set(Options.WORKER_NAME, "SockJSClient") .getMap(); UndertowXhrTransport transport = new UndertowXhrTransport(optionMap);
org.xnio.Options
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufferPool | |
| private final UndertowClient | |
| private final OptionMap | |
| private static final AttachmentKey | |
| private final XnioWorker |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| bufferPool | back to summary |
|---|---|
| private final ByteBufferPool bufferPool | |
| httpClient | back to summary |
|---|---|
| private final UndertowClient httpClient | |
| optionMap | back to summary |
|---|---|
| private final OptionMap optionMap | |
| RESPONSE_BODY | back to summary |
|---|---|
| private static final AttachmentKey<String> RESPONSE_BODY | |
| worker | back to summary |
|---|---|
| private final XnioWorker worker | |
| UndertowXhrTransport | back to summary |
|---|---|
| public UndertowXhrTransport() throws IOException | |
| UndertowXhrTransport | back to summary |
|---|---|
| public UndertowXhrTransport(OptionMap optionMap) throws IOException | |
| addHttpHeaders | back to summary |
|---|---|
| private static void addHttpHeaders(ClientRequest request, HttpHeaders headers) | |
| connectInternal | back to summary |
|---|---|
| protected void connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) Implements abstract org.
| |
| createReceiveCallback | back to summary |
|---|---|
| private ClientCallback | |
| createRequestCallback | back to summary |
|---|---|
| private ClientCallback | |
| executeInfoRequestInternal | back to summary |
|---|---|
| protected ResponseEntity Implements abstract org.
| |
| executeReceiveRequest | back to summary |
|---|---|
| private void executeReceiveRequest(final TransportRequest transportRequest, final URI url, final HttpHeaders headers, final XhrClientSockJsSession session, final CompletableFuture<WebSocketSession> connectFuture) | |
| executeRequest | back to summary |
|---|---|
| protected ResponseEntity | |
| executeSendRequestInternal | back to summary |
|---|---|
| protected ResponseEntity Implements abstract org.
| |
| getHttpClient | back to summary |
|---|---|
| public UndertowClient getHttpClient() Return Undertow's native HTTP client. | |
| getWorker | back to summary |
|---|---|
| public XnioWorker getWorker() Return the
| |
| toHttpHeaders | back to summary |
|---|---|
| private static HttpHeaders toHttpHeaders(HeaderMap headerMap) | |
| Modifier and Type | Field and Description |
|---|---|
| private final CompletableFuture | |
| private final ClientConnection | |
| private final HttpHeaders | |
| private final ByteArrayOutputStream | |
| private final TransportRequest | |
| private final XhrClientSockJsSession | |
| private final URI |
| Access | Constructor and Description |
|---|---|
| public | SockJsResponseListener(TransportRequest request, ClientConnection connection, URI url, HttpHeaders headers, XhrClientSockJsSession sockJsSession, CompletableFuture<WebSocketSession> connectFuture)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | handleEvent(StreamSourceChannel
the channel event channel)Implements org. Handle the event on this channel. |
| private void | |
| public void | |
| public void | |
| public void |
| connectFuture | back to summary |
|---|---|
| private final CompletableFuture<WebSocketSession> connectFuture | |
| connection | back to summary |
|---|---|
| private final ClientConnection connection | |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| outputStream | back to summary |
|---|---|
| private final ByteArrayOutputStream outputStream | |
| request | back to summary |
|---|---|
| private final TransportRequest request | |
| session | back to summary |
|---|---|
| private final XhrClientSockJsSession session | |
| url | back to summary |
|---|---|
| private final URI url | |
| SockJsResponseListener | back to summary |
|---|---|
| public SockJsResponseListener(TransportRequest request, ClientConnection connection, URI url, HttpHeaders headers, XhrClientSockJsSession sockJsSession, CompletableFuture<WebSocketSession> connectFuture) | |
| handleEvent | back to summary |
|---|---|
| public void handleEvent(StreamSourceChannel channel) Implements org. Doc from org. Handle the event on this channel.
| |
| handleFrame | back to summary |
|---|---|
| private void handleFrame() | |
| onFailure | back to summary |
|---|---|
| public void onFailure(Throwable failure) | |
| onSuccess | back to summary |
|---|---|
| public void onSuccess() | |
| setup | back to summary |
|---|---|
| public void setup(StreamSourceChannel channel) | |