| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AsyncListener
Listener that will be notified in the event that an asynchronous operation initiated on a ServletRequest to which the listener had been added has completed, timed out, or resulted in an error.
| Method Summary | |
|---|---|
 void | 
onComplete(AsyncEvent event)
Notifies this AsyncListener that an asynchronous operation has been completed.  | 
 void | 
onError(AsyncEvent event)
Notifies this AsyncListener that an asynchronous operation has failed to complete.  | 
 void | 
onStartAsync(AsyncEvent event)
Notifies this AsyncListener that a new asynchronous cycle is being initiated via a call to one of the ServletRequest#startAsync
 methods. | 
 void | 
onTimeout(AsyncEvent event)
Notifies this AsyncListener that an asynchronous operation has timed out.  | 
| Method Detail | 
|---|
void onComplete(AsyncEvent event)
                throws java.io.IOException
The AsyncContext corresponding to the asynchronous
 operation that has been completed may be obtained by calling
 getAsyncContext on the given
 event.
 
In addition, if this AsyncListener had been registered via a call
 to AsyncContext#addListener(AsyncListener,
 ServletRequest, ServletResponse), the supplied ServletRequest and
 ServletResponse objects may be retrieved by calling
 getSuppliedRequest and
 getSuppliedResponse,
 respectively, on the given event.
event - the AsyncEvent indicating that an asynchronous
 operation has been completed
java.io.IOException - if an I/O related error has occurred during the
 processing of the given AsyncEvent
void onTimeout(AsyncEvent event)
               throws java.io.IOException
The AsyncContext corresponding to the asynchronous
 operation that has timed out may be obtained by calling
 getAsyncContext on the given
 event.
 
In addition, if this AsyncListener had been registered via a call
 to AsyncContext#addListener(AsyncListener,
 ServletRequest, ServletResponse), the supplied ServletRequest and
 ServletResponse objects may be retrieved by calling
 getSuppliedRequest and
 getSuppliedResponse,
 respectively, on the given event.
event - the AsyncEvent indicating that an asynchronous
 operation has timed out
java.io.IOException - if an I/O related error has occurred during the
 processing of the given AsyncEvent
void onError(AsyncEvent event)
             throws java.io.IOException
The AsyncContext corresponding to the asynchronous
 operation that failed to complete may be obtained by calling
 getAsyncContext on the given
 event.
 
 
In addition, if this AsyncListener had been registered via a call
 to AsyncContext#addListener(AsyncListener,
 ServletRequest, ServletResponse), the supplied ServletRequest and
 ServletResponse objects may be retrieved by calling
 getSuppliedRequest and
 getSuppliedResponse,
 respectively, on the given event.
event - the AsyncEvent indicating that an asynchronous
 operation has failed to complete
java.io.IOException - if an I/O related error has occurred during the
 processing of the given AsyncEvent
void onStartAsync(AsyncEvent event)
                  throws java.io.IOException
ServletRequest#startAsync
 methods.
 The AsyncContext corresponding to the asynchronous
 operation that is being reinitialized may be obtained by calling
 getAsyncContext on the given
 event.
 
 
In addition, if this AsyncListener had been registered via a call
 to AsyncContext#addListener(AsyncListener,
 ServletRequest, ServletResponse), the supplied ServletRequest and
 ServletResponse objects may be retrieved by calling
 getSuppliedRequest and
 getSuppliedResponse,
 respectively, on the given event.
 
This AsyncListener will not receive any events related to the
 new asynchronous cycle unless it registers itself (via a call
 to AsyncContext#addListener) with the AsyncContext that
 is delivered as part of the given AsyncEvent.
event - the AsyncEvent indicating that a new asynchronous
 cycle is being initiated
java.io.IOException - if an I/O related error has occurred during the
 processing of the given AsyncEvent
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41