Class ThreadpoolSwiftlet


  • public abstract class ThreadpoolSwiftlet
    extends Swiftlet
    The ThreadpoolSwiftlet manages thread pools for a SwiftMQ router.
    Author:
    IIT GmbH, Bremen/Germany, Copyright (c) 2000-2005, All Rights Reserved
    • Constructor Detail

      • ThreadpoolSwiftlet

        public ThreadpoolSwiftlet()
    • Method Detail

      • getPoolnames

        public abstract java.lang.String[] getPoolnames()
        Returns all pool names.
        Returns:
        array of pool names.
      • getPoolByName

        public abstract ThreadPool getPoolByName​(java.lang.String poolName)
        Returns a pool by its name.
        Parameters:
        poolName - the pool name.
        Returns:
        a thread pool.
      • getPool

        public abstract ThreadPool getPool​(java.lang.String threadName)
        Returns a pool for a given thread name. Thread names are assigned to pools in the router configuration file.
        Parameters:
        threadName - the thread name.
        Returns:
        a thread pool.
      • dispatchTask

        public abstract void dispatchTask​(AsyncTask asyncTask)
        Dispatch a task to a pool. This method first determines the pool by the dispatch token of the task and then dispatches the task to the pool. This method is for convinience and should only be used for time-uncritical actions, e.g. if a task is dispatched only once to a pool. Otherwise, the preferred way is to use getPool() once and then dispatch the task directly into that pool.
        Parameters:
        asyncTask - the task to dispatch.
      • stopPools

        public abstract void stopPools()
        Stops all pools