public abstract class AbstractAsyncStandaloneMessageReceiver extends AbstractStandaloneMessageReceiver implements BeanNameAware
TaskExecutor, and various lifecycle callbacks.| Modifier and Type | Field and Description |
|---|---|
String |
DEFAULT_THREAD_NAME_PREFIX
Default thread name prefix.
|
logger| Constructor and Description |
|---|
AbstractAsyncStandaloneMessageReceiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Calls
AbstractStandaloneMessageReceiver.activate() when the BeanFactory initializes the receiver instance. |
protected TaskExecutor |
createDefaultTaskExecutor()
Create a default TaskExecutor.
|
protected void |
execute(Runnable runnable)
Executes the given
Runnable via this receiver's TaskExecutor. |
void |
setBeanName(String beanName) |
void |
setTaskExecutor(TaskExecutor taskExecutor)
Set the Spring
TaskExecutor to use for running the listener threads. |
activate, destroy, isActive, isRunning, onActivate, onShutdown, onStart, onStop, setAutoStartup, shutdown, start, stopgetMessageReceiver, handleConnection, setMessageReceivergetMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactorypublic final String DEFAULT_THREAD_NAME_PREFIX
public AbstractAsyncStandaloneMessageReceiver()
public void setTaskExecutor(TaskExecutor taskExecutor)
TaskExecutor to use for running the listener threads. Default is SimpleAsyncTaskExecutor, starting up a number of new threads.
Specify an alternative task executor for integration with an existing thread pool, such as the WorkManagerTaskExecutor to integrate with WebSphere or WebLogic.
public void setBeanName(String beanName)
setBeanName in interface BeanNameAwarepublic void afterPropertiesSet()
throws Exception
AbstractStandaloneMessageReceiverAbstractStandaloneMessageReceiver.activate() when the BeanFactory initializes the receiver instance.afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractStandaloneMessageReceiverExceptionprotected TaskExecutor createDefaultTaskExecutor()
The default implementation builds a SimpleAsyncTaskExecutor with the
specified bean name (or the class name, if no bean name specified) as thread name prefix.
protected void execute(Runnable runnable)
Runnable via this receiver's TaskExecutor.setTaskExecutor(TaskExecutor)