public class ServletProcessContext extends ProcessContext
A ProcessContext
created in a HttpServletRequest
execution scope.
DEFAULT
Constructor and Description |
---|
ServletProcessContext(HttpServletRequest request)
Builds a new instance with a
request to wrap. |
Modifier and Type | Method and Description |
---|---|
static ServletProcessContext |
cast(ProcessContext processContext)
Try to cast the given object in the instance of this class.
|
<T> Future<T> |
executeAsap(Callable<T> job)
Executes as soon as possible the given job and returns the related
Future . |
HttpServletRequest |
getHttpServletRequest()
Gets the wrapped request.
|
String |
toString() |
public ServletProcessContext(HttpServletRequest request)
Builds a new instance with a request
to wrap.
request
- the request to wrappublic static ServletProcessContext cast(ProcessContext processContext)
Try to cast the given object in the instance of this class. An IllegalStateException
will be thrown if
the process context is null
or an instance of a different class.
processContext
- the process contextpublic HttpServletRequest getHttpServletRequest()
Gets the wrapped request.
public <T> Future<T> executeAsap(Callable<T> job)
Executes as soon as possible the given job and returns the related Future
.
The method uses the AsyncContext
started from the given request.
executeAsap
in class ProcessContext
job
- the job to executeCopyright © 2012-2015. All Rights Reserved.