Class GuiseSessionThreadGroup

java.lang.Object
java.lang.ThreadGroup
io.guise.framework.GuiseSessionThreadGroup
All Implemented Interfaces:
io.csar.Concerned, Thread.UncaughtExceptionHandler

public class GuiseSessionThreadGroup extends 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
  • Constructor Details

    • 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:
      NullPointerException - if the given Guise session is null.
  • Method Details

    • 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> Optional<C> findConcern(Class<C> configurationClass)
      Specified by:
      findConcern in interface io.csar.Concerned