org.atmosphere.util
Class ExecutorsFactory
java.lang.Object
org.atmosphere.util.ExecutorsFactory
public class ExecutorsFactory
- extends 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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_ASYNC_THREAD
public static final int DEFAULT_ASYNC_THREAD
- See Also:
- Constant Field Values
DEFAULT_MESSAGE_THREAD
public static final int DEFAULT_MESSAGE_THREAD
- See Also:
- Constant Field Values
DEFAULT_KEEP_ALIVE
public static final int DEFAULT_KEEP_ALIVE
- See Also:
- Constant Field Values
ExecutorsFactory
public ExecutorsFactory()
getMessageDispatcher
public static ExecutorService getMessageDispatcher(AtmosphereConfig config,
String name)
- Create an
ExecutorService to be used for dispatching messages, not I/O events.
- Parameters:
config - the AtmosphereConfigname - a name to use if shared is false.
- Returns:
ExecutorService
getAsyncOperationExecutor
public static ExecutorService getAsyncOperationExecutor(AtmosphereConfig config,
String name)
- Create an
ExecutorService to be used for dispatching I/O events.
- Parameters:
config - the AtmosphereConfigname - a name to use if shared is false.
- Returns:
ExecutorService
getScheduler
public static ScheduledExecutorService getScheduler(AtmosphereConfig config)
- Create a
ScheduledExecutorService used ot schedule I/O and non I/O events.
- Parameters:
config - the AtmosphereConfig
- Returns:
ScheduledExecutorService
Copyright © 2014. All Rights Reserved.