Package io.guise.framework
Class GuiseSessionThreadGroup
- java.lang.Object
-
- java.lang.ThreadGroup
-
- io.guise.framework.GuiseSessionThreadGroup
-
- All Implemented Interfaces:
io.csar.Concerned
,java.lang.Thread.UncaughtExceptionHandler
public class GuiseSessionThreadGroup extends java.lang.ThreadGroup implements io.csar.Concerned
A thread group allocated to a Guise session. All threads accessing a Guise session should be part of the session's thread group.This thread group also allows access to managed configurations using
Concern
. Thread-group-local configurations are retrieved by searching for a configuration first in the Guise session usingConcerned.findConcern(Class)
, and second in the Guise application usingConcerned.findConcern(Class)
.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description GuiseSessionThreadGroup(GuiseSession guiseSession)
Guise session constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <C extends io.csar.Concern>
java.util.Optional<C>findConcern(java.lang.Class<C> configurationClass)
GuiseSession
getGuiseSession()
-
Methods inherited from class java.lang.ThreadGroup
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString, uncaughtException
-
-
-
-
Constructor Detail
-
GuiseSessionThreadGroup
public GuiseSessionThreadGroup(GuiseSession guiseSession)
Guise session constructor.- Parameters:
guiseSession
- The Guise session to which this thread group belongs and in which its related threads run.- Throws:
java.lang.NullPointerException
- if the given Guise session isnull
.
-
-
Method Detail
-
getGuiseSession
public GuiseSession getGuiseSession()
- Returns:
- The Guise session to which this thread group belongs and in which its related threads run.
-
findConcern
public <C extends io.csar.Concern> java.util.Optional<C> findConcern(java.lang.Class<C> configurationClass)
- Specified by:
findConcern
in interfaceio.csar.Concerned
-
-