Example usage for javax.servlet AsyncListener onComplete

List of usage examples for javax.servlet AsyncListener onComplete

Introduction

In this page you can find the example usage for javax.servlet AsyncListener onComplete.

Prototype

public void onComplete(AsyncEvent event) throws IOException;

Source Link

Document

Notifies this AsyncListener that an asynchronous operation has been completed.

Usage

From source file:org.jruby.rack.mock.MockAsyncContext.java

@Override
public void complete() {
    MockHttpServletRequest mockRequest = WebUtils.getNativeRequest(request, MockHttpServletRequest.class);
    if (mockRequest != null) {
        mockRequest.setAsyncStarted(false);
    }//from   w ww.  j  a v a  2  s . co  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);
        }
    }
}