DRAFT

javax.servlet
Interface AsyncListener

All Superinterfaces:
java.util.EventListener

public interface AsyncListener
extends java.util.EventListener

Listener that will be notified when an asynchronous operation that was started on a ServletRequest by a call to ServletRequest#startAsync or ServletRequest#startAsync(ServletRequest, ServletResponse) completes or times out.

Since:
Servlet 3.0

Method Summary
 void onComplete(AsyncEvent event)
          Notifies this AsyncListener that an asynchronous operation started on the ServletRequest with which this AsyncListener was registered has been completed.
 void onTimeout(AsyncEvent event)
          Notifies this AsyncListener that an asynchronous operation started on the ServletRequest with which this AsyncListener was registered has timed out.
 

Method Detail

onComplete

void onComplete(AsyncEvent event)
                throws java.io.IOException
Notifies this AsyncListener that an asynchronous operation started on the ServletRequest with which this AsyncListener was registered has been completed.

Parameters:
event - the AsyncEvent containing the request and response objects that were used when this AsyncListener was registered via a call to ServletRequest#addAsyncListener(AsyncListener) or ServletRequest#addAsyncListener(AsyncListener, ServletRequest, ServletResponse)
Throws:
java.io.IOException - if an I/O exception occurred during the processing of the given AsyncEvent

onTimeout

void onTimeout(AsyncEvent event)
               throws java.io.IOException
Notifies this AsyncListener that an asynchronous operation started on the ServletRequest with which this AsyncListener was registered has timed out.

Parameters:
event - the AsyncEvent containing the request and response objects that were used when this AsyncListener was registered via a call to ServletRequest#addAsyncListener(AsyncListener) or ServletRequest#addAsyncListener(AsyncListener, ServletRequest, ServletResponse)
Throws:
java.io.IOException - if an I/O exception occurred during the processing of the given AsyncEvent

DRAFT

Submit a bug or feature

Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.