public interface RequestContextAccessor
RequestContext
objects. It's preferred to use it via RequestContext.getCurrent(CdsRuntime)
.
The implementation of the factory is loaded via ExtendedServiceLoader
and is therefore pluggable.Modifier and Type | Method and Description |
---|---|
RequestContext |
getCurrent(CdsRuntime runtime)
Gives access to either the current
RequestContext ,
or if this does not exist to a helper RequestContext that itself ensures that there is always a RequestContext opened. |
boolean |
isActive() |
boolean isActive()
RequestContext
is currently activeRequestContext getCurrent(CdsRuntime runtime)
RequestContext
,
or if this does not exist to a helper RequestContext
that itself ensures that there is always a RequestContext
opened.
This method will throw a NullPointerException
, if the passed CdsRuntime
was null, but guarantees that it will never return null
runtime
- A reference to the underlying CdsRuntime
instance.RequestContext
or a helper RequestContext
Copyright © 2023. All rights reserved.