public class JettyXhrTransport extends AbstractXhrTransport implements XhrTransport, 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 request,
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) |
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, getRequestHeaders, getTransportTypes, isXhrStreamingDisabled, setRequestHeaders, setXhrStreamingDisabled, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
executeSendRequest, isXhrStreamingDisabled
connect, getTransportTypes
executeInfoRequest
public JettyXhrTransport(org.eclipse.jetty.client.HttpClient httpClient)
public org.eclipse.jetty.client.HttpClient getHttpClient()
public void start()
start
in interface org.springframework.context.Lifecycle
public void stop()
stop
in interface org.springframework.context.Lifecycle
public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
protected org.springframework.http.ResponseEntity<String> executeInfoRequestInternal(URI infoUrl)
executeInfoRequestInternal
in class AbstractXhrTransport
public org.springframework.http.ResponseEntity<String> executeSendRequestInternal(URI url, org.springframework.http.HttpHeaders headers, TextMessage message)
executeSendRequestInternal
in class AbstractXhrTransport
protected org.springframework.http.ResponseEntity<String> executeRequest(URI url, org.eclipse.jetty.http.HttpMethod method, org.springframework.http.HttpHeaders headers, String body)
protected void connectInternal(TransportRequest request, WebSocketHandler handler, URI url, org.springframework.http.HttpHeaders handshakeHeaders, XhrClientSockJsSession session, org.springframework.util.concurrent.SettableListenableFuture<WebSocketSession> connectFuture)
connectInternal
in class AbstractXhrTransport