Package org.springframework.http.server
Class ServletServerHttpAsyncRequestControl
java.lang.Object
org.springframework.http.server.ServletServerHttpAsyncRequestControl
- All Implemented Interfaces:
- AsyncListener,- EventListener,- ServerHttpAsyncRequestControl
public class ServletServerHttpAsyncRequestControl
extends Object
implements ServerHttpAsyncRequestControl, AsyncListener
A 
ServerHttpAsyncRequestControl to use on Servlet containers.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionServletServerHttpAsyncRequestControl(ServletServerHttpRequest request, ServletServerHttpResponse response) Constructor accepting a request and response pair that are expected to be of typeServletServerHttpRequestandServletServerHttpResponserespectively.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcomplete()Mark asynchronous request processing as completed.booleanReturn whether asynchronous request processing has been completed.booleanReturn whether asynchronous request processing has been started.voidonComplete(AsyncEvent event) voidonError(AsyncEvent event) voidonStartAsync(AsyncEvent event) voidonTimeout(AsyncEvent event) voidstart()Enable asynchronous processing after which the response remains open until a call toServerHttpAsyncRequestControl.complete()is made or the server times out the request.voidstart(long timeout) A variation onServerHttpAsyncRequestControl.start()that allows specifying a timeout value to use for asynchronous processing.
- 
Constructor Details- 
ServletServerHttpAsyncRequestControlpublic ServletServerHttpAsyncRequestControl(ServletServerHttpRequest request, ServletServerHttpResponse response) Constructor accepting a request and response pair that are expected to be of typeServletServerHttpRequestandServletServerHttpResponserespectively.
 
- 
- 
Method Details- 
isStartedpublic boolean isStarted()Description copied from interface:ServerHttpAsyncRequestControlReturn whether asynchronous request processing has been started.- Specified by:
- isStartedin interface- ServerHttpAsyncRequestControl
 
- 
isCompletedpublic boolean isCompleted()Description copied from interface:ServerHttpAsyncRequestControlReturn whether asynchronous request processing has been completed.- Specified by:
- isCompletedin interface- ServerHttpAsyncRequestControl
 
- 
startpublic void start()Description copied from interface:ServerHttpAsyncRequestControlEnable asynchronous processing after which the response remains open until a call toServerHttpAsyncRequestControl.complete()is made or the server times out the request. Once enabled, additional calls to this method are ignored.- Specified by:
- startin interface- ServerHttpAsyncRequestControl
 
- 
startpublic void start(long timeout) Description copied from interface:ServerHttpAsyncRequestControlA variation onServerHttpAsyncRequestControl.start()that allows specifying a timeout value to use for asynchronous processing. IfServerHttpAsyncRequestControl.complete()is not called within the specified value, the request times out.- Specified by:
- startin interface- ServerHttpAsyncRequestControl
 
- 
completepublic void complete()Description copied from interface:ServerHttpAsyncRequestControlMark asynchronous request processing as completed.- Specified by:
- completein interface- ServerHttpAsyncRequestControl
 
- 
onComplete- Specified by:
- onCompletein interface- AsyncListener
- Throws:
- IOException
 
- 
onStartAsync- Specified by:
- onStartAsyncin interface- AsyncListener
- Throws:
- IOException
 
- 
onError- Specified by:
- onErrorin interface- AsyncListener
- Throws:
- IOException
 
- 
onTimeout- Specified by:
- onTimeoutin interface- AsyncListener
- Throws:
- IOException
 
 
-