org.apache.servicemix.executors
Interface ExecutorFactory

All Known Implementing Classes:
ExecutorFactoryImpl

public interface ExecutorFactory

Factory to create Executors.

Author:
Guillaume Nodet

Field Summary
static java.lang.String ALLOW_CORE_THREADS_TIMEOUT
           
static java.lang.String BYPASS_IF_SYNCHRONOUS
           
static java.lang.String CORE_POOL_SIZE
           
static java.lang.String KEEP_ALIVE_TIME
           
static java.lang.String MAXIMUM_POOL_SIZE
           
static java.lang.String QUEUE_SIZE
           
static java.lang.String SHUTDOWN_DELAY
           
static java.lang.String THREAD_DAEMON
           
static java.lang.String THREAD_PRIORITY
           
 
Method Summary
 Executor createDaemonExecutor(java.lang.String id)
          Create a new daemon executor for the given Id.
 Executor createExecutor(java.lang.String id)
          Create a new executor for the given Id.
 Executor createExecutor(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> config)
          Create a new executor for the given id using the additional configuration options provided.
 

Field Detail

ALLOW_CORE_THREADS_TIMEOUT

static final java.lang.String ALLOW_CORE_THREADS_TIMEOUT

BYPASS_IF_SYNCHRONOUS

static final java.lang.String BYPASS_IF_SYNCHRONOUS

CORE_POOL_SIZE

static final java.lang.String CORE_POOL_SIZE

KEEP_ALIVE_TIME

static final java.lang.String KEEP_ALIVE_TIME

MAXIMUM_POOL_SIZE

static final java.lang.String MAXIMUM_POOL_SIZE

QUEUE_SIZE

static final java.lang.String QUEUE_SIZE

SHUTDOWN_DELAY

static final java.lang.String SHUTDOWN_DELAY

THREAD_DAEMON

static final java.lang.String THREAD_DAEMON

THREAD_PRIORITY

static final java.lang.String THREAD_PRIORITY
Method Detail

createExecutor

Executor createExecutor(java.lang.String id)
Create a new executor for the given Id. The id may be used to provide per executor configuration.

Parameters:
id - the id of the executor to create
Returns:
a configured Executor

createExecutor

Executor createExecutor(java.lang.String id,
                        java.util.Map<java.lang.String,java.lang.Object> config)
Create a new executor for the given id using the additional configuration options provided. Note that not every ExecutorFactory implementation will support all available options. If the factory does not support the option, it will get ignored.

Parameters:
id - the id of the executor to create
config - the additional executor configuration options
Returns:
a configured Executor

createDaemonExecutor

Executor createDaemonExecutor(java.lang.String id)
Create a new daemon executor for the given Id. The excutor should use daemon thread underlying The id may be used to provide per executor configuration.

Parameters:
id - the id of the executor to create
Returns:
a configured Executor


Copyright © 2005-2011 FuseSource. All Rights Reserved.