com.sun.grizzly.arp
Interface AsyncFilter
public interface AsyncFilter
An interface marker used to execute operations before
a AsyncProcesssorTask
in pre/post or interrupted. Usualy,
implementation of this interface is called by an instance of
AsyncExecutor
.
Using an AsyncExecutor
, it is possible to suspend or resume
the current request processing. Once suspended, the request can always
be resumed using the AsyncExecutor
, and the normal Grizzly
invokation path will be used (like calling Adapter#service
or GrizzlyAdapter#service
).
To invoke the GrizzlyAdapter
from an AsyncFilter, just invoke
AsyncExecutor.execute()
, and then calling AsyncExecutor.postExecute()
will commit the response.
Implementation of this interface must be thread-safe.
- Author:
- Jeanfrancois Arcand
doFilter
boolean doFilter(AsyncExecutor asyncExecutor)
- Execute and return true if the next
AsyncFilter
can be invoked. Return false to stop calling the
AsyncFilter
.
Copyright © 2009 SUN Microsystems. All Rights Reserved.