public class UndertowXhrTransport extends AbstractXhrTransport
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);
Optionslogger, PRELUDE| Constructor and Description |
|---|
UndertowXhrTransport() |
UndertowXhrTransport(OptionMap optionMap) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectInternal(TransportRequest request,
WebSocketHandler handler,
URI receiveUrl,
org.springframework.http.HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture) |
protected org.springframework.http.ResponseEntity<String> |
executeInfoRequestInternal(URI infoUrl,
org.springframework.http.HttpHeaders headers) |
protected org.springframework.http.ResponseEntity<String> |
executeRequest(URI url,
io.undertow.util.HttpString method,
org.springframework.http.HttpHeaders headers,
String body) |
protected org.springframework.http.ResponseEntity<String> |
executeSendRequestInternal(URI url,
org.springframework.http.HttpHeaders headers,
TextMessage message) |
io.undertow.client.UndertowClient |
getHttpClient()
Return Undertow's native HTTP client.
|
XnioWorker |
getWorker()
Return the
XnioWorker backing the I/O operations
for Undertow's HTTP client. |
connect, executeInfoRequest, executeSendRequest, getTransportTypes, isXhrStreamingDisabled, setXhrStreamingDisabledpublic UndertowXhrTransport()
throws IOException
IOExceptionpublic UndertowXhrTransport(OptionMap optionMap) throws IOException
IOExceptionpublic io.undertow.client.UndertowClient getHttpClient()
public XnioWorker getWorker()
XnioWorker backing the I/O operations
for Undertow's HTTP client.Xnioprotected void connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, org.springframework.http.HttpHeaders handshakeHeaders, XhrClientSockJsSession session, org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture)
connectInternal in class AbstractXhrTransportprotected org.springframework.http.ResponseEntity<String> executeInfoRequestInternal(URI infoUrl, org.springframework.http.HttpHeaders headers)
executeInfoRequestInternal in class AbstractXhrTransportprotected org.springframework.http.ResponseEntity<String> executeSendRequestInternal(URI url, org.springframework.http.HttpHeaders headers, TextMessage message)
executeSendRequestInternal in class AbstractXhrTransport