Package org.glassfish.jersey.servlet.spi
Interface AsyncContextDelegate
public interface AsyncContextDelegate
Utilized by the Servlet container response writer to deal with the container async features.
Individual instances are created by
AsyncContextDelegateProvider.- Author:
- Jakub Podlesak
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Invoked upon a response writing completion when the response write is either committed or canceled.default booleanReturntruewhen the AsyncContext is completed, such as whencomplete()has been called.voidsuspend()Invoked by the superiorContainerResponseWriterresponsible for writing the response when processing is to be suspended.
-
Method Details
-
suspend
Invoked by the superiorContainerResponseWriterresponsible for writing the response when processing is to be suspended. An implementation can throw anUnsupportedOperationExceptionif suspend is not supported (the default behavior).- Throws:
IllegalStateException- if underlyingservlet requestthrows an exception.- See Also:
-
complete
void complete()Invoked upon a response writing completion when the response write is either committed or canceled. -
isCompleted
default boolean isCompleted()Return
truewhen the AsyncContext is completed, such as whencomplete()has been called.For compatibility, the default is
false.- Returns:
truewhen the AsyncContext is completed.
-