Class SecurityContextHolder

java.lang.Object
org.gridgain.internal.security.context.SecurityContextHolder

public class SecurityContextHolder extends Object
Security context holder that stores security context in thread local state.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    static @Nullable org.gridgain.internal.security.context.SecurityContext
    Get security context from thread local state or return null if it is not set.
    static org.gridgain.internal.security.context.SecurityContext
    Get security context from thread local state or throw exception if it is not set.
    static void
    set(@Nullable org.gridgain.internal.security.context.SecurityContext ctx)
    Set security context to thread local state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecurityContextHolder

      public SecurityContextHolder()
  • Method Details

    • getOrThrow

      public static org.gridgain.internal.security.context.SecurityContext getOrThrow()
      Get security context from thread local state or throw exception if it is not set.
      Returns:
      Security context.
      Throws:
      SecurityContextIsNotSetException - If security context is not set.
    • getOrNull

      @Nullable public static @Nullable org.gridgain.internal.security.context.SecurityContext getOrNull()
      Get security context from thread local state or return null if it is not set.
      Returns:
      Security context or null.
    • set

      public static void set(@Nullable @Nullable org.gridgain.internal.security.context.SecurityContext ctx)
      Set security context to thread local state.
      Parameters:
      ctx - Security context.
    • clear

      public static void clear()