Class ExecutorsFactory


  • public class ExecutorsFactory
    extends java.lang.Object
    Stateless Factory to create ExecutorService used in all Atmosphere Component. By default they are shared amongst all component. To change the behavior, add ApplicationConfig.BROADCASTER_SHARABLE_THREAD_POOLS
    Author:
    Jeanfrancois Arcand
    • Constructor Detail

      • ExecutorsFactory

        public ExecutorsFactory()
    • Method Detail

      • getMessageDispatcher

        public static java.util.concurrent.ExecutorService getMessageDispatcher​(AtmosphereConfig config,
                                                                                java.lang.String name)
        Create an ExecutorService to be used for dispatching messages, not I/O events.
        Parameters:
        config - the AtmosphereConfig
        name - a name to use if shared is false.
        Returns:
        ExecutorService
      • getAsyncOperationExecutor

        public static java.util.concurrent.ExecutorService getAsyncOperationExecutor​(AtmosphereConfig config,
                                                                                     java.lang.String name)
        Create an ExecutorService to be used for dispatching I/O events.
        Parameters:
        config - the AtmosphereConfig
        name - a name to use if shared is false.
        Returns:
        ExecutorService
      • getScheduler

        public static java.util.concurrent.ScheduledExecutorService getScheduler​(AtmosphereConfig config)
        Create a ScheduledExecutorService used ot schedule I/O and non I/O events.
        Parameters:
        config - the AtmosphereConfig
        Returns:
        ScheduledExecutorService