Class ThreadContexts
- java.lang.Object
-
- org.jboss.resteasy.spi.concurrent.ThreadContexts
-
public class ThreadContexts extends Object
Represents a collection ofThreadContext
's.- Author:
- James R. Perkins
-
-
Constructor Summary
Constructors Constructor Description ThreadContexts()
Creates a new collection instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadContexts
add(ThreadContext<?> threadContext)
Adds the context to the current collection.ThreadContexts
clear()
Clears the current contexts.Collection<ThreadContext<Object>>
getThreadContexts()
Returns a collection of the current thread contexts.
-
-
-
Method Detail
-
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
-
-