Class SecurityContextThreadContextDecorator

java.lang.Object
com.sap.cloud.sdk.cloudplatform.security.SecurityContextThreadContextDecorator
All Implemented Interfaces:
ThreadContextDecorator

public class SecurityContextThreadContextDecorator extends Object implements 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.
  • Constructor Details

    • SecurityContextThreadContextDecorator

      public SecurityContextThreadContextDecorator()
  • Method Details

    • decorateCallable

      @Nonnull public <T> Callable<T> decorateCallable(@Nonnull Callable<T> callable)
      Description copied from interface: ThreadContextDecorator
      Enhance 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:
      decorateCallable in interface ThreadContextDecorator
      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: ThreadContextDecorator
      Returns 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:
      getPriority in interface ThreadContextDecorator
      Returns:
      The priority indicator.