Class UimaAsThreadFactory

java.lang.Object
org.apache.uima.aae.UimaAsThreadFactory
All Implemented Interfaces:
ThreadFactory

public class UimaAsThreadFactory extends Object implements ThreadFactory
Custom ThreadFactory for use in the TaskExecutor. The TaskExecutor is plugged in by Spring from spring xml file generated by dd2spring. The TaskExecutor is only defined for PrimitiveControllers and its main purpose is to provide thread pooling and management. Each new thread produced by this ThreadFactory is used to initialize a dedicated AE instance in the PrimitiveController.
  • Field Details

  • Constructor Details

  • Method Details

    • setThreadNamePrefix

      public void setThreadNamePrefix(String prefix)
    • setThreadGroup

      public void setThreadGroup(ThreadGroup tGroup)
    • setDaemon

      public void setDaemon(boolean daemon)
    • stop

      public void stop()
    • newThread

      public Thread newThread(Runnable r)
      Creates a new thread, initializes instance of AE via a call on a given PrimitiveController. Once the thread finishes initializing AE instance in the controller, it calls run() on a given Runnable. This Runnable is a Worker instance managed by the TaskExecutor. When the thread calls run() on the Runnable it blocks until the Worker releases it.
      Specified by:
      newThread in interface ThreadFactory