|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncWebRequest
Extend NativeWebRequest
with methods for async request processing.
Field Summary |
---|
Fields inherited from interface org.springframework.web.context.request.RequestAttributes |
---|
REFERENCE_REQUEST, REFERENCE_SESSION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION |
Method Summary | |
---|---|
void |
complete()
Complete async request processing making a best effort but without any effect if async request processing has already completed for any reason including a timeout. |
boolean |
isAsyncCompleted()
Whether async processing has completed either normally via calls to complete() or for other reasons such as a timeout likely
detected in a separate thread during async request processing. |
boolean |
isAsyncStarted()
Whether async processing is in progress and has not yet completed. |
void |
sendError(HttpStatus status,
java.lang.String message)
Send an error to the client making a best effort to do so but without any effect if async request processing has already completed, for example due to a timeout. |
void |
setTimeout(java.lang.Long timeout)
Set the timeout for asynchronous request processing in milliseconds. |
void |
setTimeoutHandler(java.lang.Runnable runnable)
Invoked on a timeout to complete the response instead of the default behavior that sets the status to 503 (SERVICE_UNAVAILABLE). |
void |
startAsync()
Mark the start of async request processing for example ensuring the request remains open in order to be completed in a separate thread. |
Methods inherited from interface org.springframework.web.context.request.NativeWebRequest |
---|
getNativeRequest, getNativeRequest, getNativeResponse, getNativeResponse |
Methods inherited from interface org.springframework.web.context.request.WebRequest |
---|
checkNotModified, checkNotModified, getContextPath, getDescription, getHeader, getHeaderNames, getHeaderValues, getLocale, getParameter, getParameterMap, getParameterNames, getParameterValues, getRemoteUser, getUserPrincipal, isSecure, isUserInRole |
Methods inherited from interface org.springframework.web.context.request.RequestAttributes |
---|
getAttribute, getAttributeNames, getSessionId, getSessionMutex, registerDestructionCallback, removeAttribute, resolveReference, setAttribute |
Method Detail |
---|
void setTimeout(java.lang.Long timeout)
void setTimeoutHandler(java.lang.Runnable runnable)
void startAsync()
java.lang.IllegalStateException
- if async processing has started, if it is
not supported, or if it has completed.boolean isAsyncStarted()
void complete()
boolean isAsyncCompleted()
complete()
or for other reasons such as a timeout likely
detected in a separate thread during async request processing.
void sendError(HttpStatus status, java.lang.String message)
|
Spring Framework | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |