public abstract class AbstractIndependentThreadContextFactory extends AbstractContextFactory
Created 20. Januar 2003
IContextFactory| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal |
threadLocal |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIndependentThreadContextFactory()
Construct object of class AbstractIndependentThreadContextFactory.
|
| Modifier and Type | Method and Description |
|---|---|
protected IContextStack |
getContextStack()
Internally get the stack of contexts associated with the actual thread.
|
Object |
getTypeUnsafeContext()
Get actual context from stack of contexts.
|
Object |
getTypeUnsafeContextOrNullIfUnavailable()
Get actual context from stack of contexts.
|
boolean |
isAvailable()
Checks if there is at least one actual context stacked.
|
Object |
popTypeUnsafeContext()
Get and remove actual context from the stack of contexts.
|
void |
pushTypeUnsafeContext(Object context)
Add new context to the top of the stack of contexts.
|
void |
removeTypeUnsafeContext()
Remove actual context including all other stacked contexts completely
(optional operation).
|
protected void |
setContextStack(IContextStack contextStack)
Internally get the stack of contexts associated with the actual thread.
|
void |
setTypeUnsafeContext(Object context)
Replace actual context with new one in stack of contexts.
|
int |
size()
Get the number of context entries in the stack of contexts.
|
protected ThreadLocal threadLocal
protected AbstractIndependentThreadContextFactory()
throws ContextFactoryRegistrationError
ContextFactoryRegistrationError - when the context factory is
already registered with the context factory registryprotected IContextStack getContextStack()
protected void setContextStack(IContextStack contextStack)
contextStack - The new contextStack valuepublic boolean isAvailable()
public int size()
public Object getTypeUnsafeContext() throws ContextUnavailableException
ContextUnavailableException - when no (more) context is available
on the context stackpublic Object getTypeUnsafeContextOrNullIfUnavailable()
public void setTypeUnsafeContext(Object context)
context - new actual context replacing the old one on the stackpublic void removeTypeUnsafeContext()
throws UnsupportedOperationException
UnsupportedOperationException - when the context factory isn't
supporting this writing optional operationpublic Object popTypeUnsafeContext() throws ContextUnavailableException
ContextUnavailableException - when no (more) context is available
on the context stackpublic void pushTypeUnsafeContext(Object context)
context - new actual context| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice