XhrTransport implementation that uses a
RestTemplate.
| Modifier and Type | Class and Description |
|---|---|
| private class | RestTemplateXhrTransport.
Splits the body of an HTTP response into SockJS frames and delegates those
to an |
| private static class | RestTemplateXhrTransport.
A RequestCallback to add the headers and (optionally) String content. |
| Modifier and Type | Field and Description |
|---|---|
| private final RestOperations | |
| private TaskExecutor | |
| private static final ResponseExtractor | textResponseExtractor
A simple ResponseExtractor that reads the body into a String. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| restTemplate | back to summary |
|---|---|
| private final RestOperations restTemplate | |
| taskExecutor | back to summary |
|---|---|
| private TaskExecutor taskExecutor | |
| textResponseExtractor | back to summary |
|---|---|
| private static final ResponseExtractor<ResponseEntity<String>> textResponseExtractor A simple ResponseExtractor that reads the body into a String. | |
| RestTemplateXhrTransport | back to summary |
|---|---|
| public RestTemplateXhrTransport() | |
| RestTemplateXhrTransport | back to summary |
|---|---|
| public RestTemplateXhrTransport(RestOperations restTemplate) | |
| connectInternal | back to summary |
|---|---|
| protected void connectInternal(final TransportRequest transportRequest, final WebSocketHandler handler, final URI receiveUrl, final HttpHeaders handshakeHeaders, final XhrClientSockJsSession session, final CompletableFuture<WebSocketSession> connectFuture) Implements abstract org.
| |
| executeInfoRequestInternal | back to summary |
|---|---|
| protected ResponseEntity Implements abstract org.
| |
| executeSendRequestInternal | back to summary |
|---|---|
| public ResponseEntity Implements abstract org.
| |
| getRestTemplate | back to summary |
|---|---|
| public RestOperations getRestTemplate() Return the configured | |
| getTaskExecutor | back to summary |
|---|---|
| public TaskExecutor getTaskExecutor() Return the configured | |
| nonNull | back to summary |
|---|---|
| private static <T> T nonNull(T result) | |
| setTaskExecutor | back to summary |
|---|---|
| public void setTaskExecutor(TaskExecutor taskExecutor) Configure the By default | |
XhrClientSockJsSession.
| Modifier and Type | Field and Description |
|---|---|
| private final XhrClientSockJsSession |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | extractData(ClientHttpResponse
the HTTP response response)Implements org. Extract data from the given |
| private void |
| sockJsSession | back to summary |
|---|---|
| private final XhrClientSockJsSession sockJsSession | |
| XhrReceiveExtractor | back to summary |
|---|---|
| public XhrReceiveExtractor(XhrClientSockJsSession sockJsSession) | |
| extractData | back to summary |
|---|---|
| public Object extractData(ClientHttpResponse response) throws IOException Implements org. Doc from org. Extract data from the given
| |
| handleFrame | back to summary |
|---|---|
| private void handleFrame(ByteArrayOutputStream os) | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final HttpHeaders |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | doWithRequest(ClientHttpRequest
the active HTTP request request)Implements org. Gets called by |
| body | back to summary |
|---|---|
| private final String body
| |
| headers | back to summary |
|---|---|
| private final HttpHeaders headers | |
| XhrRequestCallback | back to summary |
|---|---|
| public XhrRequestCallback(HttpHeaders headers) | |
| XhrRequestCallback | back to summary |
|---|---|
| public XhrRequestCallback(HttpHeaders headers, String body) | |
| doWithRequest | back to summary |
|---|---|
| public void doWithRequest(ClientHttpRequest request) throws IOException Implements org. Doc from org. Gets called by
| |