com.creamtec.ajaxswing.core

## Class AjaxSwingThreadGroup

- java.lang.Object
- - java.lang.ThreadGroup
  - - com.creamtec.ajaxswing.core.AjaxSwingThreadGroup

- All Implemented Interfaces:
    java.lang.Thread.UncaughtExceptionHandler

      public class AjaxSwingThreadGroup
      extends java.lang.ThreadGroup

  AjaxSwing uses its own thread groups to keep track of the threads created by, and of behalf of, the virtual application. It needs it to maintain the association between the thread and the client agent. The thread group also acts as a pool of threads.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AjaxSwingThreadGroup(ClientAgent agent)` Creates a thread group for the given client agent

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AjaxSwingThread` | `allocateThread()` Allocate a thread for the given client
    `ClientAgent` | `getClientAgent()` Returns the client agent associated with this thread group
    `AjaxSwingThread` | `getPrimeThread()` Returns the main thread of this thread group
    `void` | `releaseThread(java.lang.Thread thread)` Puts the thread back into the pool of ready-to-run threads
    `void` | `setClientAgent(ClientAgent agent)` Sets the client agent associated with this thread group
    `void` | `setPrimeThread(AjaxSwingThread thread)` Sets the main thread of this thread group
    `void` | `shutdown()` Stops all threads

    - ### 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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AjaxSwingThreadGroup

          public AjaxSwingThreadGroup(ClientAgent agent)

      Creates a thread group for the given client agent
      Parameters:
        `agent` - ClientAgent

  - ### Method Detail

    - #### getClientAgent

          public ClientAgent getClientAgent()

      Returns the client agent associated with this thread group
      Returns:
        ClientAgent

    - #### setClientAgent

          public void setClientAgent(ClientAgent agent)

      Sets the client agent associated with this thread group
      Parameters:
        `agent` - ClientAgent

    - #### getPrimeThread

          public AjaxSwingThread getPrimeThread()

      Returns the main thread of this thread group
      Returns:
        AjaxSwingThread

    - #### setPrimeThread

          public void setPrimeThread(AjaxSwingThread thread)

      Sets the main thread of this thread group
      Parameters:
        `thread` - AjaxSwingThread

    - #### allocateThread

          public AjaxSwingThread allocateThread()

      Allocate a thread for the given client

    - #### releaseThread

          public void releaseThread(java.lang.Thread thread)

      Puts the thread back into the pool of ready-to-run threads
      Parameters:
        `thread` - Thread

    - #### shutdown

          public void shutdown()

      Stops all threads

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.