Example usage for org.springframework.mock.web MockHttpServletRequest setAsyncStarted

List of usage examples for org.springframework.mock.web MockHttpServletRequest setAsyncStarted

Introduction

In this page you can find the example usage for org.springframework.mock.web MockHttpServletRequest setAsyncStarted.

Prototype

public void setAsyncStarted(boolean asyncStarted) 

Source Link

Usage

From source file:org.springframework.mock.web.MockAsyncContext.java

@Override
public void complete() {
    MockHttpServletRequest mockRequest = WebUtils.getNativeRequest(request, MockHttpServletRequest.class);
    if (mockRequest != null) {
        mockRequest.setAsyncStarted(false);
    }/*from   w  ww .ja  v a  2  s  .  c o m*/
    for (AsyncListener listener : this.listeners) {
        try {
            listener.onComplete(new AsyncEvent(this, this.request, this.response));
        } catch (IOException e) {
            throw new IllegalStateException("AsyncListener failure", e);
        }
    }
}