/** * Instantiate an empty {@link MethodJmsListenerEndpoint} for further * configuration with provided parameters in {@link #processJmsListener}. * @return a new {@code MethodJmsListenerEndpoint} or subclass thereof * @since 4.1.9 * @see MethodJmsListenerEndpoint#createMessageListenerInstance() */ protected MethodJmsListenerEndpoint createMethodJmsListenerEndpoint() { return new MethodJmsListenerEndpoint(); }
private MethodJmsListenerEndpoint createMethodJmsEndpoint(DefaultMessageHandlerMethodFactory factory, Method method) { MethodJmsListenerEndpoint endpoint = new MethodJmsListenerEndpoint(); endpoint.setBean(listener); endpoint.setMethod(method); endpoint.setMessageHandlerMethodFactory(factory); return endpoint; }
private MessagingMessageListenerAdapter createInstance( DefaultMessageHandlerMethodFactory factory, Method method, MessageListenerContainer container) { MethodJmsListenerEndpoint endpoint = new MethodJmsListenerEndpoint(); endpoint.setBean(this.sample); endpoint.setMethod(method); endpoint.setMessageHandlerMethodFactory(factory); return endpoint.createMessageListener(container); }
@Test public void createMessageListenerNoFactory() { MethodJmsListenerEndpoint endpoint = new MethodJmsListenerEndpoint(); endpoint.setBean(this); endpoint.setMethod(getTestMethod()); this.thrown.expect(IllegalStateException.class); endpoint.createMessageListener(this.container); }
@Test public void createMessageListener() { MethodJmsListenerEndpoint endpoint = new MethodJmsListenerEndpoint(); endpoint.setBean(this); endpoint.setMethod(getTestMethod()); endpoint.setMessageHandlerMethodFactory(this.factory); assertNotNull(endpoint.createMessageListener(this.container)); }
/** * Instantiate an empty {@link MethodJmsListenerEndpoint} for further * configuration with provided parameters in {@link #processJmsListener}. * @return a new {@code MethodJmsListenerEndpoint} or subclass thereof * @since 4.1.9 * @see MethodJmsListenerEndpoint#createMessageListenerInstance() */ protected MethodJmsListenerEndpoint createMethodJmsListenerEndpoint() { return new MethodJmsListenerEndpoint(); }
/** * Instantiate an empty {@link MethodJmsListenerEndpoint} for further * configuration with provided parameters in {@link #processJmsListener}. * @return a new {@code MethodJmsListenerEndpoint} or subclass thereof * @since 4.1.9 * @see MethodJmsListenerEndpoint#createMessageListenerInstance() */ protected MethodJmsListenerEndpoint createMethodJmsListenerEndpoint() { return new MethodJmsListenerEndpoint(); }