public class RequestContextExecutor extends Object
Callable
within a RequestContext
.
Usually, a RequestContext
is initialized by a RequestContextServletFilter
. However, for tasks that
are not triggered by a request (such as background jobs), the servlet filter is not executed. Therefore, in such
cases, this class provides a wrapper that initializes the required RequestContext
.
Constructor and Description |
---|
RequestContextExecutor() |
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(Callable<T> callable) |
RequestContextExecutor |
withListeners(RequestContextListener... listeners) |
RequestContextExecutor |
withoutDefaultListeners() |
RequestContextExecutor |
withRequestContext(RequestContext requestContext) |
public RequestContextExecutor withRequestContext(RequestContext requestContext)
public RequestContextExecutor withoutDefaultListeners()
public RequestContextExecutor withListeners(RequestContextListener... listeners)
Copyright © 2018 SAP SE. All rights reserved.