Class SecurityContextThreadContextDecorator
java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.SecurityContextThreadContextDecorator
- All Implemented Interfaces:
ThreadContextDecorator
Implementation of
ThreadContextDecorator that ensures the correct initialization of
Tokens when working with non-container managed threads on Cloud Foundry.
This decorator is only active when the class com.sap.cloud.security.token.SecurityContext is available on the
classpath. Check dependency com.sap.cloud.security:java-api for details.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sap.cloud.sdk.cloudplatform.thread.ThreadContextDecorator
ThreadContextDecorator.DefaultPriorities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Callable<T>decorateCallable(Callable<T> callable) Enhance an operation with specific behaviour to be applied around its execution.intReturns the priority that defines the order in which decorators are applied.
-
Constructor Details
-
SecurityContextThreadContextDecorator
public SecurityContextThreadContextDecorator()
-
-
Method Details
-
decorateCallable
Description copied from interface:ThreadContextDecoratorEnhance an operation with specific behaviour to be applied around its execution. Decoration means returning a new callable which itself will eventually call the given callable.- Specified by:
decorateCallablein interfaceThreadContextDecorator- Type Parameters:
T- Callable generic return type.- Parameters:
callable- The callable to be decorated.- Returns:
- The new, enhanced callable.
-
getPriority
public int getPriority()Description copied from interface:ThreadContextDecoratorReturns the priority that defines the order in which decorators are applied. Smaller priorities are applied first. Negative number must not be used as they are reserved for internal use.- Specified by:
getPriorityin interfaceThreadContextDecorator- Returns:
- The priority indicator.
-