提交 e90143e0 编写于 作者: J Juergen Hoeller

Polishing

上级 9c46cb6f
......@@ -593,7 +593,7 @@ public abstract class AnnotationUtils {
}
if (nestedAnnotationsAsMap && value instanceof Annotation) {
attrs.put(method.getName(),
getAnnotationAttributes((Annotation) value, classValuesAsString, true));
getAnnotationAttributes((Annotation) value, classValuesAsString, true));
}
else if (nestedAnnotationsAsMap && value instanceof Annotation[]) {
Annotation[] realAnnotations = (Annotation[]) value;
......
......@@ -109,7 +109,7 @@ final class SimpleStreamingAsyncClientHttpRequest extends AbstractAsyncClientHtt
@Override
protected ListenableFuture<ClientHttpResponse> executeInternal(final HttpHeaders headers) throws IOException {
return taskExecutor.submitListenable(new Callable<ClientHttpResponse>() {
return this.taskExecutor.submitListenable(new Callable<ClientHttpResponse>() {
@Override
public ClientHttpResponse call() throws Exception {
try {
......
......@@ -74,9 +74,8 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
/**
* Constructor accepting an existing {@link WebSocketContainer} instance.
*
* <p>For XML configuration see {@link WebSocketContainerFactoryBean}. For Java
* configuration use {@code ContainerProvider.getWebSocketContainer()} to obtain
* <p>For XML configuration, see {@link WebSocketContainerFactoryBean}. For Java
* configuration, use {@code ContainerProvider.getWebSocketContainer()} to obtain
* the {@code WebSocketContainer} instance.
*/
public StandardWebSocketClient(WebSocketContainer webSocketContainer) {
......@@ -89,8 +88,7 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
* Set an {@link AsyncListenableTaskExecutor} to use when opening connections.
* If this property is set to {@code null}, calls to any of the
* {@code doHandshake} methods will block until the connection is established.
*
* <p>By default an instance of {@code SimpleAsyncTaskExecutor} is used.
* <p>By default, an instance of {@code SimpleAsyncTaskExecutor} is used.
*/
public void setTaskExecutor(AsyncListenableTaskExecutor taskExecutor) {
this.taskExecutor = taskExecutor;
......
......@@ -106,11 +106,9 @@ public abstract class AbstractSockJsService implements SockJsService {
* iframe so that code in the iframe can run from a domain local to the SockJS
* server. Since the iframe needs to load the SockJS javascript client library,
* this property allows specifying where to load it from.
*
* <p>By default this is set to point to
* "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js". However it can
* also be set to point to a URL served by the application.
*
* "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js".
* However, it can also be set to point to a URL served by the application.
* <p>Note that it's possible to specify a relative URL in which case the URL
* must be relative to the iframe URL. For example assuming a SockJS endpoint
* mapped to "/sockjs", and resulting iframe URL "/sockjs/iframe.html", then the
......@@ -153,16 +151,13 @@ public abstract class AbstractSockJsService implements SockJsService {
* clients with a "cookie_needed" boolean property that indicates whether the use of a
* JSESSIONID cookie is required for the application to function correctly, e.g. for
* load balancing or in Java Servlet containers for the use of an HTTP session.
*
* <p>This is especially important for IE 8,9 that support XDomainRequest -- a modified
* AJAX/XHR -- that can do requests across domains but does not send any cookies. In
* those cases, the SockJS client prefers the "iframe-htmlfile" transport over
* "xdr-streaming" in order to be able to send cookies.
*
* <p>The SockJS protocol also expects a SockJS service to echo back the JSESSIONID
* cookie when this property is set to true. However, when running in a Servlet
* container this is not necessary since the container takes care of it.
*
* <p>The default value is "true" to maximize the chance for applications to work
* correctly in IE 8,9 with support for cookies (and the JSESSIONID cookie in
* particular). However, an application can choose to set this to "false" if
......@@ -363,7 +358,6 @@ public abstract class AbstractSockJsService implements SockJsService {
protected void addCorsHeaders(ServerHttpRequest request, ServerHttpResponse response, HttpMethod... httpMethods) {
HttpHeaders requestHeaders = request.getHeaders();
HttpHeaders responseHeaders = response.getHeaders();
......@@ -444,6 +438,7 @@ public abstract class AbstractSockJsService implements SockJsService {
}
};
private final SockJsRequestHandler iframeHandler = new SockJsRequestHandler() {
private static final String IFRAME_CONTENT =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册