Class 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 using Concerned.findConcern(Class), and second in the Guise application using Concerned.findConcern(Class).

    Author:
    Garret Wilson
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 is null.
    • 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 interface io.csar.Concerned