spring-framework / org.springframework.web.socket.sockjs.client / JettyXhrTransport

JettyXhrTransport

open class JettyXhrTransport : AbstractXhrTransport, Lifecycle

An XHR transport based on Jetty's org.eclipse.jetty.client.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)); 

Author
Rossen Stoyanchev

Since
4.1

Constructors

<init>

JettyXhrTransport(httpClient: HttpClient)

Functions

executeSendRequestInternal

open fun executeSendRequestInternal(url: URI, headers: HttpHeaders, message: TextMessage): ResponseEntity<String>

getHttpClient

open fun getHttpClient(): HttpClient

isRunning

open fun isRunning(): Boolean

start

open fun start(): Unit

stop

open fun stop(): Unit