Examples of CallableProcessingInterceptor


Examples of org.springframework.web.context.request.async.CallableProcessingInterceptor

  @Test
  public void startCallableProcessingTimeoutAndComplete() throws Exception {

    StubCallable callable = new StubCallable();

    CallableProcessingInterceptor interceptor = mock(CallableProcessingInterceptor.class);
    given(interceptor.handleTimeout(this.asyncWebRequest, callable)).willReturn(RESULT_NONE);

    this.asyncManager.registerCallableInterceptor("interceptor", interceptor);
    this.asyncManager.startCallableProcessing(callable);

    this.asyncWebRequest.onTimeout(ASYNC_EVENT);
View Full Code Here

Examples of org.springframework.web.context.request.async.CallableProcessingInterceptor

  @Test
  public void startCallableProcessingTimeoutAndResumeThroughInterceptor() throws Exception {

    StubCallable callable = new StubCallable();

    CallableProcessingInterceptor interceptor = mock(CallableProcessingInterceptor.class);
    given(interceptor.handleTimeout(this.asyncWebRequest, callable)).willReturn(22);

    this.asyncManager.registerCallableInterceptor("timeoutInterceptor", interceptor);
    this.asyncManager.startCallableProcessing(callable);

    this.asyncWebRequest.onTimeout(ASYNC_EVENT);
View Full Code Here

Examples of org.springframework.web.context.request.async.CallableProcessingInterceptor

  public void startCallableProcessingAfterTimeoutException() throws Exception {

    StubCallable callable = new StubCallable();
    Exception exception = new Exception();

    CallableProcessingInterceptor interceptor = mock(CallableProcessingInterceptor.class);
    given(interceptor.handleTimeout(this.asyncWebRequest, callable)).willThrow(exception);

    this.asyncManager.registerCallableInterceptor("timeoutInterceptor", interceptor);
    this.asyncManager.startCallableProcessing(callable);

    this.asyncWebRequest.onTimeout(ASYNC_EVENT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.