IT. Expert System.

Java Enterprise Edition (EE)

AsyncListener


javax.servlet
Interface AsyncListener

All Superinterfaces:
java.util.EventListener
public interface AsyncListener
extends java.util.EventListener

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.

Since:
Servlet 3.0

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

onComplete

void onComplete(AsyncEvent event)
                throws java.io.IOException
Notifies this AsyncListener that an asynchronous operation has been completed.

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.

Parameters:
event - the AsyncEvent indicating that an asynchronous operation has been completed
Throws:
java.io.IOException - if an I/O related error has occurred during the processing of the given AsyncEvent

onTimeout

void onTimeout(AsyncEvent event)
               throws java.io.IOException
Notifies this AsyncListener that an asynchronous operation has timed out.

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.

Parameters:
event - the AsyncEvent indicating that an asynchronous operation has timed out
Throws:
java.io.IOException - if an I/O related error has occurred during the processing of the given AsyncEvent

onError

void onError(AsyncEvent event)
             throws java.io.IOException
Notifies this AsyncListener that an asynchronous operation has failed to complete.

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.

Parameters:
event - the AsyncEvent indicating that an asynchronous operation has failed to complete
Throws:
java.io.IOException - if an I/O related error has occurred during the processing of the given AsyncEvent

onStartAsync

void onStartAsync(AsyncEvent event)
                  throws java.io.IOException
Notifies this AsyncListener that a new asynchronous cycle is being initiated via a call to one of the 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.

Parameters:
event - the AsyncEvent indicating that a new asynchronous cycle is being initiated
Throws:
java.io.IOException - if an I/O related error has occurred during the processing of the given AsyncEvent


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 454 / 248377659. Delta: 0.03588 с