public class RabbitListenerTestHarness extends 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 |
DEFAULT_RABBIT_LISTENER_CONTAINER_FACTORY_BEAN_NAMEHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
RabbitListenerTestHarness(AnnotationMetadata importMetadata) |
| Modifier and Type | Method and Description |
|---|---|
RabbitListenerTestHarness.InvocationData |
getNextInvocationDataFor(String id,
long wait,
TimeUnit unit) |
<T> T |
getSpy(String id) |
protected void |
processListener(MethodRabbitListenerEndpoint endpoint,
RabbitListener rabbitListener,
Object bean,
Object adminTarget,
String beanName) |
afterSingletonsInstantiated, getOrder, postProcessAfterInitialization, postProcessBeforeInitialization, processAmqpListener, setBeanClassLoader, setBeanFactory, setContainerFactoryBeanName, setEndpointRegistry, setMessageHandlerMethodFactorypublic RabbitListenerTestHarness(AnnotationMetadata importMetadata)
protected void processListener(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object bean, Object adminTarget, String beanName)
processListener in class RabbitListenerAnnotationBeanPostProcessorpublic RabbitListenerTestHarness.InvocationData getNextInvocationDataFor(String id, long wait, TimeUnit unit) throws InterruptedException
InterruptedExceptionpublic <T> T getSpy(String id)