Add config options for MVC async interceptors

The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.

Issue: SPR-9914
This commit is contained in:
Rossen Stoyanchev
2012-10-26 21:29:54 -04:00
parent e4a13cd4ad
commit e14ba9dec3
10 changed files with 240 additions and 16 deletions

View File

@@ -175,6 +175,11 @@ public final class WebAsyncManager {
this.callableInterceptors.put(key, interceptor);
}
public void registerAllCallableInterceptors(Map<Object, CallableProcessingInterceptor> interceptors) {
Assert.notNull(interceptors);
this.callableInterceptors.putAll(interceptors);
}
/**
* Register a {@link DeferredResultProcessingInterceptor} that will be
* applied when concurrent request handling with a {@link DeferredResult}
@@ -188,6 +193,11 @@ public final class WebAsyncManager {
this.deferredResultInterceptors.put(key, interceptor);
}
public void registerAllDeferredResultInterceptors(Map<Object, DeferredResultProcessingInterceptor> interceptors) {
Assert.notNull(interceptors);
this.deferredResultInterceptors.putAll(interceptors);
}
/**
* Clear {@linkplain #getConcurrentResult() concurrentResult} and
* {@linkplain #getConcurrentResultContext() concurrentResultContext}.