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_NAME, RABBIT_EMPTY_STRING_ARGUMENTS_PROPERTYHIGHEST_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 Collection<Declarable> |
processListener(MethodRabbitListenerEndpoint endpoint,
RabbitListener rabbitListener,
Object bean,
Object target,
String beanName) |
afterSingletonsInstantiated, assertBeanFactory, getOrder, noBeanFoundMessage, postProcessAfterInitialization, postProcessBeforeInitialization, processAmqpListener, resolveExpressionAsString, setBeanClassLoader, setBeanFactory, setCharset, setContainerFactoryBeanName, setEndpointRegistry, setEnvironment, setMessageHandlerMethodFactorypublic RabbitListenerTestHarness(AnnotationMetadata importMetadata)
protected Collection<Declarable> processListener(MethodRabbitListenerEndpoint endpoint, RabbitListener rabbitListener, Object bean, Object target, String beanName)
processListener in class RabbitListenerAnnotationBeanPostProcessorpublic RabbitListenerTestHarness.InvocationData getNextInvocationDataFor(String id, long wait, TimeUnit unit) throws InterruptedException
InterruptedExceptionpublic <T> T getSpy(String id)