public class UndertowXhrTransport extends AbstractXhrTransport implements XhrTransport
UndertowClient.
Compatible with Undertow 1.0, 1.1, 1.2.
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,
HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
SettableListenableFuture<WebSocketSession> connectFuture) |
protected ResponseEntity<String> |
executeInfoRequestInternal(URI infoUrl,
HttpHeaders headers) |
protected ResponseEntity<String> |
executeRequest(URI url,
io.undertow.util.HttpString method,
HttpHeaders headers,
String body) |
protected ResponseEntity<String> |
executeSendRequestInternal(URI url,
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, getRequestHeaders, getTransportTypes, isXhrStreamingDisabled, setRequestHeaders, setXhrStreamingDisabled, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexecuteSendRequest, isXhrStreamingDisabledconnect, getTransportTypesexecuteInfoRequestpublic 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, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture)
connectInternal in class AbstractXhrTransportprotected ResponseEntity<String> executeInfoRequestInternal(URI infoUrl, HttpHeaders headers)
executeInfoRequestInternal in class AbstractXhrTransportprotected ResponseEntity<String> executeSendRequestInternal(URI url, HttpHeaders headers, TextMessage message)
executeSendRequestInternal in class AbstractXhrTransportprotected ResponseEntity<String> executeRequest(URI url, io.undertow.util.HttpString method, HttpHeaders headers, String body)