protected void processAmqpListener(RabbitListener rabbitListener, Method method, Object bean, String beanName) { Method methodToUse = checkProxy(method, bean); MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setMethod(methodToUse); processListener(endpoint, rabbitListener, bean, methodToUse, beanName); }
protected void processAmqpListener(RabbitListener rabbitListener, Method method, Object bean, String beanName) { Method methodToUse = checkProxy(method, bean); MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setMethod(methodToUse); processListener(endpoint, rabbitListener, bean, methodToUse, beanName); }
private MethodRabbitListenerEndpoint createMethodRabbitEndpoint( DefaultMessageHandlerMethodFactory factory, Method method) { MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setBean(sample); endpoint.setMethod(method); endpoint.setMessageHandlerMethodFactory(factory); return endpoint; }
private MessagingMessageListenerAdapter createInstance( DefaultMessageHandlerMethodFactory factory, Method method, MessageListenerContainer container) { MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setBean(sample); endpoint.setMethod(method); endpoint.setMessageHandlerMethodFactory(factory); return endpoint.createMessageListener(container); }
@Test public void createMessageListenerNoFactory() { MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setBean(this); endpoint.setMethod(getTestMethod()); thrown.expect(IllegalStateException.class); endpoint.createMessageListener(container); }
@Test public void createMessageListener() { MethodRabbitListenerEndpoint endpoint = new MethodRabbitListenerEndpoint(); endpoint.setBean(this); endpoint.setMethod(getTestMethod()); endpoint.setMessageHandlerMethodFactory(factory); assertNotNull(endpoint.createMessageListener(container)); }