Enum Class ThreadContext

java.lang.Object
java.lang.Enum<ThreadContext>
dev.demeng.pluginbase.promise.ThreadContext
All Implemented Interfaces:
Serializable, Comparable<ThreadContext>, Constable

public enum ThreadContext extends Enum<ThreadContext>
Represents the two main types of Thread on the server.
  • Enum Constant Details

  • Method Details

    • values

      public static ThreadContext[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ThreadContext valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forCurrentThread

      public static ThreadContext forCurrentThread()
      Gets the thread context of the current thread.
      Returns:
      The threat context of the current thread
    • forThread

      public static ThreadContext forThread(Thread thread)
      Gets the thread context of the specified thread.
      Parameters:
      thread - The thread to get the context of
      Returns:
      The thread context of the specified thread