Package com.sun.jna

# Class CallbackThreadInitializer

java.lang.Object
com.sun.jna.CallbackThreadInitializer

public class CallbackThreadInitializer extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CallbackThreadInitializer()`
  The default initializer causes the callback thread to remain attached as a daemon thread, using the default thread name and group.
  `CallbackThreadInitializer(boolean daemon)`
  Keep the callback thread attached, with the given daemon state, using the default thread name and group.
  `CallbackThreadInitializer(boolean daemon, boolean detach)`
  Uses the default thread name and group.
  `CallbackThreadInitializer(boolean daemon, boolean detach, String name)`
  Uses the default thread group.
  `CallbackThreadInitializer(boolean daemon, boolean detach, String name, ThreadGroup group)`
  Specify all aspects of how the callback thread should be initialized.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `detach(Callback cb)`
  Returns whether the Thread should be detached from the VM after the callback exits, if the thread was not already attached to begin with.
  `String`
  `getName(Callback cb)`
  Returns the desired name for this thread, or null for the default.
  `ThreadGroup`
  `getThreadGroup(Callback cb)`
  Returns the desired ThreadGroup for thread, or null for the default.
  `boolean`
  `isDaemon(Callback cb)`
  Returns whether the callback thread should be a daemon thread.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CallbackThreadInitializer

    public CallbackThreadInitializer()
    The default initializer causes the callback thread to remain attached as a daemon thread, using the default thread name and group.

  - ### CallbackThreadInitializer

    public CallbackThreadInitializer(boolean daemon)
    Keep the callback thread attached, with the given daemon state, using the default thread name and group.

  - ### CallbackThreadInitializer

    public CallbackThreadInitializer(boolean daemon, boolean detach)
    Uses the default thread name and group.

  - ### CallbackThreadInitializer

    public CallbackThreadInitializer(boolean daemon, boolean detach, String name)
    Uses the default thread group.

  - ### CallbackThreadInitializer

    public CallbackThreadInitializer(boolean daemon, boolean detach, String name, ThreadGroup group)
    Specify all aspects of how the callback thread should be initialized.

- ## Method Details

  - ### getName

    public String getName(Callback cb)
    Returns the desired name for this thread, or null for the default.

  - ### getThreadGroup

    public ThreadGroup getThreadGroup(Callback cb)
    Returns the desired ThreadGroup for thread, or null for the default.

  - ### isDaemon

    public boolean isDaemon(Callback cb)
    Returns whether the callback thread should be a daemon thread.

  - ### detach

    public boolean detach(Callback cb)
    Returns whether the Thread should be detached from the VM after the callback exits, if the thread was not already attached to begin with.