类 ServletServerHttpAsyncRequestControl
java.lang.Object
cn.taketoday.http.server.ServletServerHttpAsyncRequestControl
- 所有已实现的接口:
ServerHttpAsyncRequestControl,AsyncListener,EventListener
public class ServletServerHttpAsyncRequestControl
extends Object
implements ServerHttpAsyncRequestControl, AsyncListener
A
ServerHttpAsyncRequestControl to use on Servlet containers (Servlet 3.0+).- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段修饰符和类型字段说明private final AtomicBooleanprivate AsyncContextprivate static final longprivate final ServletServerHttpRequestprivate final ServletServerHttpResponse -
构造器概要
构造器构造器说明ServletServerHttpAsyncRequestControl(ServletServerHttpRequest request, ServletServerHttpResponse response) Constructor accepting a request and response pair that are expected to be of typeServletServerHttpRequestandServletServerHttpResponserespectively. -
方法概要
修饰符和类型方法说明voidcomplete()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 to use for asynchronous processing.
-
字段详细资料
-
NO_TIMEOUT_VALUE
private static final long NO_TIMEOUT_VALUE- 另请参阅:
-
asyncContext
-
request
-
response
-
asyncCompleted
-
-
构造器详细资料
-
ServletServerHttpAsyncRequestControl
public ServletServerHttpAsyncRequestControl(ServletServerHttpRequest request, ServletServerHttpResponse response) Constructor accepting a request and response pair that are expected to be of typeServletServerHttpRequestandServletServerHttpResponserespectively.
-
-
方法详细资料
-
isStarted
public boolean isStarted()从接口复制的说明:ServerHttpAsyncRequestControlReturn whether asynchronous request processing has been started.- 指定者:
isStarted在接口中ServerHttpAsyncRequestControl
-
isCompleted
public boolean isCompleted()从接口复制的说明:ServerHttpAsyncRequestControlReturn whether asynchronous request processing has been completed.- 指定者:
isCompleted在接口中ServerHttpAsyncRequestControl
-
start
public void start()从接口复制的说明: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.- 指定者:
start在接口中ServerHttpAsyncRequestControl
-
start
public void start(long timeout) 从接口复制的说明:ServerHttpAsyncRequestControlA variation onServerHttpAsyncRequestControl.start()that allows specifying a timeout value to use to use for asynchronous processing. IfServerHttpAsyncRequestControl.complete()is not called within the specified value, the request times out.- 指定者:
start在接口中ServerHttpAsyncRequestControl
-
complete
public void complete()从接口复制的说明:ServerHttpAsyncRequestControlMark asynchronous request processing as completed.- 指定者:
complete在接口中ServerHttpAsyncRequestControl
-
onComplete
- 指定者:
onComplete在接口中AsyncListener- 抛出:
IOException
-
onStartAsync
- 指定者:
onStartAsync在接口中AsyncListener- 抛出:
IOException
-
onError
- 指定者:
onError在接口中AsyncListener- 抛出:
IOException
-
onTimeout
- 指定者:
onTimeout在接口中AsyncListener- 抛出:
IOException
-