Class ThreadContexts

java.lang.Object
org.jboss.resteasy.spi.concurrent.ThreadContexts

public class ThreadContexts extends Object
Represents a collection of ThreadContext's.
Author:
James R. Perkins
  • Constructor Details

    • ThreadContexts

      public ThreadContexts()
      Creates a new collection instance.
  • Method Details

    • add

      public ThreadContexts add(ThreadContext<?> threadContext)
      Adds the context to the current collection.
      Parameters:
      threadContext - the thread context to add
      Returns:
      this instance
    • getThreadContexts

      public Collection<ThreadContext<Object>> getThreadContexts()
      Returns a collection of the current thread contexts. This is a snapshot of what is currently in the collection sorted by priority.
      Returns:
      an immutable collection of the curren thread contexts
    • clear

      public ThreadContexts clear()
      Clears the current contexts.
      Returns:
      this instance