|
23 | 23 | import org.springframework.beans.factory.support.RootBeanDefinition;
|
24 | 24 | import org.springframework.expression.spel.support.SimpleEvaluationContext;
|
25 | 25 | import org.springframework.expression.spel.support.StandardEvaluationContext;
|
26 |
| -import org.springframework.integration.channel.MessagePublishingErrorHandler; |
27 | 26 | import org.springframework.integration.config.IntegrationConfigUtils;
|
28 | 27 | import org.springframework.integration.metadata.MetadataStore;
|
29 |
| -import org.springframework.integration.support.channel.BeanFactoryChannelResolver; |
30 | 28 | import org.springframework.messaging.MessageChannel;
|
31 |
| -import org.springframework.messaging.core.DestinationResolver; |
32 | 29 | import org.springframework.scheduling.TaskScheduler;
|
33 | 30 | import org.springframework.util.Assert;
|
34 |
| -import org.springframework.util.ErrorHandler; |
35 | 31 |
|
36 | 32 | /**
|
37 | 33 | * Utility methods for accessing common integration components from the BeanFactory.
|
@@ -111,10 +107,6 @@ public abstract class IntegrationContextUtils {
|
111 | 107 |
|
112 | 108 | public static final String LIST_MESSAGE_HANDLER_FACTORY_BEAN_NAME = "integrationListMessageHandlerMethodFactory";
|
113 | 109 |
|
114 |
| - public static final String CHANNEL_RESOLVER_BEAN_NAME = "integrationChannelResolver"; |
115 |
| - |
116 |
| - public static final String MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME = "integrationMessagePublishingErrorHandler"; |
117 |
| - |
118 | 110 | /**
|
119 | 111 | * @param beanFactory BeanFactory for lookup, must not be null.
|
120 | 112 | * @return The {@link MetadataStore} bean whose name is "metadataStore".
|
@@ -220,39 +212,4 @@ public static Properties getIntegrationProperties(BeanFactory beanFactory) {
|
220 | 212 | return properties;
|
221 | 213 | }
|
222 | 214 |
|
223 |
| - /** |
224 |
| - * Obtain a {@link DestinationResolver} registered with the |
225 |
| - * {@value #CHANNEL_RESOLVER_BEAN_NAME} bean name. |
226 |
| - * @param beanFactory BeanFactory for lookup, must not be null. |
227 |
| - * @return the instance of {@link DestinationResolver} bean whose name is |
228 |
| - * {@value #CHANNEL_RESOLVER_BEAN_NAME}. |
229 |
| - * @since 5.2 |
230 |
| - */ |
231 |
| - @SuppressWarnings("unchecked") |
232 |
| - public static DestinationResolver<MessageChannel> getChannelResolver(BeanFactory beanFactory) { |
233 |
| - Assert.notNull(beanFactory, "'beanFactory' must not be null"); |
234 |
| - if (!beanFactory.containsBean(CHANNEL_RESOLVER_BEAN_NAME)) { |
235 |
| - return new BeanFactoryChannelResolver(beanFactory); |
236 |
| - } |
237 |
| - return beanFactory.getBean(CHANNEL_RESOLVER_BEAN_NAME, DestinationResolver.class); |
238 |
| - } |
239 |
| - |
240 |
| - /** |
241 |
| - * Obtain an {@link ErrorHandler} registered with the |
242 |
| - * {@value #MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME} bean name. |
243 |
| - * By default resolves to the {@link org.springframework.integration.channel.MessagePublishingErrorHandler} |
244 |
| - * with the {@value #CHANNEL_RESOLVER_BEAN_NAME} {@link DestinationResolver} bean. |
245 |
| - * @param beanFactory BeanFactory for lookup, must not be null. |
246 |
| - * @return the instance of {@link ErrorHandler} bean whose name is |
247 |
| - * {@value #MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME}. |
248 |
| - * @since 5.2 |
249 |
| - */ |
250 |
| - public static ErrorHandler getErrorHandler(BeanFactory beanFactory) { |
251 |
| - Assert.notNull(beanFactory, "'beanFactory' must not be null"); |
252 |
| - if (!beanFactory.containsBean(MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME)) { |
253 |
| - return new MessagePublishingErrorHandler(getChannelResolver(beanFactory)); |
254 |
| - } |
255 |
| - return beanFactory.getBean(MESSAGE_PUBLISHING_ERROR_HANDLER_BEAN_NAME, ErrorHandler.class); |
256 |
| - } |
257 |
| - |
258 | 215 | }
|
0 commit comments