public class TenantThreadContextListener extends Object implements ThreadContextListener
ThreadContextListener that ensures the correct initialization of Tenants when
working with non-container managed threads on all supported Cloud platforms.ThreadContextListener.DefaultPriorities| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_TENANT |
| Constructor and Description |
|---|
TenantThreadContextListener()
Default constructor.
|
TenantThreadContextListener(Tenant tenant)
Constructor for providing a
Tenant to be returned by this listener. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterInitialize(ThreadContext threadContext,
ThreadContext parentThreadContext) |
void |
beforeDestroy(ThreadContext threadContext,
ThreadContext parentThreadContext) |
int |
getPriority() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterDestroy, beforeInitialize, compareTopublic static final String PROPERTY_TENANT
public TenantThreadContextListener()
public int getPriority()
getPriority in interface ThreadContextListenerpublic void afterInitialize(@Nonnull ThreadContext threadContext, @Nullable ThreadContext parentThreadContext)
afterInitialize in interface ThreadContextListenerpublic void beforeDestroy(@Nonnull ThreadContext threadContext, @Nullable ThreadContext parentThreadContext)
beforeDestroy in interface ThreadContextListenerCopyright © 2019 SAP SE. All rights reserved.