public class JettyXhrTransport extends AbstractXhrTransport implements org.springframework.context.Lifecycle
HttpClient.
When used for testing purposes (e.g. load testing) the HttpClient
properties must be set to allow a larger than usual number of connections and
threads. For example:
HttpClient httpClient = new HttpClient(); httpClient.setMaxConnectionsPerDestination(1000); httpClient.setExecutor(new QueuedThreadPool(500));
logger, PRELUDE| Constructor and Description |
|---|
JettyXhrTransport(org.eclipse.jetty.client.HttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectInternal(TransportRequest transportRequest,
WebSocketHandler handler,
URI url,
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,
org.eclipse.jetty.http.HttpMethod method,
org.springframework.http.HttpHeaders headers,
String body) |
org.springframework.http.ResponseEntity<String> |
executeSendRequestInternal(URI url,
org.springframework.http.HttpHeaders headers,
TextMessage message) |
org.eclipse.jetty.client.HttpClient |
getHttpClient() |
boolean |
isRunning() |
void |
start() |
void |
stop() |
connect, executeInfoRequest, executeSendRequest, getTransportTypes, isXhrStreamingDisabled, setXhrStreamingDisabledpublic JettyXhrTransport(org.eclipse.jetty.client.HttpClient httpClient)
public org.eclipse.jetty.client.HttpClient getHttpClient()
public void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecycleprotected void connectInternal(TransportRequest transportRequest, WebSocketHandler handler, URI url, 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 AbstractXhrTransportpublic org.springframework.http.ResponseEntity<String> executeSendRequestInternal(URI url, org.springframework.http.HttpHeaders headers, TextMessage message)
executeSendRequestInternal in class AbstractXhrTransport