Polishing
This commit is contained in:
parent
ae0d945a05
commit
bc13cb2af5
|
@ -91,8 +91,8 @@ public class XpathExpectationsHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parse the content, evaluate the XPath expression as a {@link Node}, and
|
||||
* assert it with the given {@code Matcher<Node>}.
|
||||
* Parse the content, evaluate the XPath expression as a {@link Node},
|
||||
* and assert it with the given {@code Matcher<Node>}.
|
||||
*/
|
||||
public void assertNode(byte[] content, String encoding, final Matcher<? super Node> matcher) throws Exception {
|
||||
Document document = parseXmlByteArray(content, encoding);
|
||||
|
@ -105,7 +105,6 @@ public class XpathExpectationsHelper {
|
|||
* @param xml the content to parse
|
||||
* @param encoding optional content encoding, if provided as metadata (e.g. in HTTP headers)
|
||||
* @return the parsed document
|
||||
* @throws Exception
|
||||
*/
|
||||
protected Document parseXmlByteArray(byte[] xml, String encoding) throws Exception {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
@ -51,16 +52,12 @@ public interface CallableProcessingInterceptor {
|
|||
/**
|
||||
* Invoked <em>before</em> the start of concurrent handling in the original
|
||||
* thread in which the {@code Callable} is submitted for concurrent handling.
|
||||
*
|
||||
* <p>
|
||||
* This is useful for capturing the state of the current thread just prior to
|
||||
* <p>This is useful for capturing the state of the current thread just prior to
|
||||
* invoking the {@link Callable}. Once the state is captured, it can then be
|
||||
* transferred to the new {@link Thread} in
|
||||
* {@link #preProcess(NativeWebRequest, Callable)}. Capturing the state of
|
||||
* Spring Security's SecurityContextHolder and migrating it to the new Thread
|
||||
* is a concrete example of where this is useful.
|
||||
* </p>
|
||||
*
|
||||
* @param request the current request
|
||||
* @param task the task for the current async request
|
||||
* @throws Exception in case of errors
|
||||
|
@ -71,7 +68,6 @@ public interface CallableProcessingInterceptor {
|
|||
* Invoked <em>after</em> the start of concurrent handling in the async
|
||||
* thread in which the {@code Callable} is executed and <em>before</em> the
|
||||
* actual invocation of the {@code Callable}.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param task the task for the current async request
|
||||
* @throws Exception in case of errors
|
||||
|
@ -83,7 +79,6 @@ public interface CallableProcessingInterceptor {
|
|||
* async thread in which the {@code Callable} is executed. This method may
|
||||
* be invoked later than {@code afterTimeout} or {@code afterCompletion}
|
||||
* depending on when the {@code Callable} finishes processing.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param task the task for the current async request
|
||||
* @param concurrentResult the result of concurrent processing, which could
|
||||
|
@ -97,7 +92,6 @@ public interface CallableProcessingInterceptor {
|
|||
* the {@code Callable} task completes. Implementations may return a value,
|
||||
* including an {@link Exception}, to use instead of the value the
|
||||
* {@link Callable} did not return in time.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param task the task for the current async request
|
||||
* @return a concurrent result value; if the value is anything other than
|
||||
|
@ -110,7 +104,6 @@ public interface CallableProcessingInterceptor {
|
|||
/**
|
||||
* Invoked from a container thread when async processing completes for any
|
||||
* reason including timeout or network error.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param task the task for the current async request
|
||||
* @throws Exception in case of errors
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -13,6 +13,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.web.context.request.async;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
|
Loading…
Reference in New Issue