public abstract class AbstractAsyncStandaloneMessageReceiver extends AbstractStandaloneMessageReceiver implements org.springframework.beans.factory.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 org.springframework.core.task.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(org.springframework.core.task.TaskExecutor taskExecutor)
Set the Spring
TaskExecutor to use for running the listener threads. |
activate, destroy, isActive, isRunning, onActivate, onShutdown, onStart, onStop, setAutoStartup, shutdown, start, stop
getMessageReceiver, handleConnection, setMessageReceiver
getMessageFactory, handleConnection, handleNoEndpointFoundException, setMessageFactory
public final String DEFAULT_THREAD_NAME_PREFIX
public AbstractAsyncStandaloneMessageReceiver()
public void setTaskExecutor(org.springframework.core.task.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 org.springframework.scheduling.commonj.WorkManagerTaskExecutor
to integrate with WebSphere or WebLogic.
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public void afterPropertiesSet() throws Exception
AbstractStandaloneMessageReceiver
AbstractStandaloneMessageReceiver.activate()
when the BeanFactory initializes the receiver instance.afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractStandaloneMessageReceiver
Exception
protected org.springframework.core.task.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.
SimpleAsyncTaskExecutor.SimpleAsyncTaskExecutor(String)
protected void execute(Runnable runnable)
Runnable
via this receiver's TaskExecutor
.setTaskExecutor(TaskExecutor)
Copyright © 2018 Pivotal Software. All rights reserved.