public class RabbitListenerTestHarness
extends org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor
RabbitListenerAnnotationBeanPostProcessor.
Wraps the listener bean in a CGLIB proxy with an advice to capture the arguments
and result (if any) in a blocking queue. Test cases can access the results
by autowiring the test harness into test cases.| Modifier and Type | Class and Description |
|---|---|
static class |
RabbitListenerTestHarness.InvocationData |
| Constructor and Description |
|---|
RabbitListenerTestHarness(org.springframework.core.type.AnnotationMetadata importMetadata) |
| Modifier and Type | Method and Description |
|---|---|
RabbitListenerTestHarness.InvocationData |
getNextInvocationDataFor(java.lang.String id,
long wait,
java.util.concurrent.TimeUnit unit) |
<T> T |
getSpy(java.lang.String id) |
protected void |
processListener(org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpoint endpoint,
org.springframework.amqp.rabbit.annotation.RabbitListener rabbitListener,
java.lang.Object bean,
java.lang.Object adminTarget,
java.lang.String beanName) |
afterSingletonsInstantiated, getOrder, postProcessAfterInitialization, postProcessBeforeInitialization, processAmqpListener, setBeanClassLoader, setBeanFactory, setContainerFactoryBeanName, setEndpointRegistry, setMessageHandlerMethodFactorypublic RabbitListenerTestHarness(org.springframework.core.type.AnnotationMetadata importMetadata)
protected void processListener(org.springframework.amqp.rabbit.listener.MethodRabbitListenerEndpoint endpoint,
org.springframework.amqp.rabbit.annotation.RabbitListener rabbitListener,
java.lang.Object bean,
java.lang.Object adminTarget,
java.lang.String beanName)
processListener in class org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessorpublic RabbitListenerTestHarness.InvocationData getNextInvocationDataFor(java.lang.String id, long wait, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic <T> T getSpy(java.lang.String id)