use of org.springframework.integration.context.IntegrationProperties in project spring-integration by spring-projects.
the class GlobalChannelInterceptorProcessor method afterSingletonsInstantiated.
@Override
public void afterSingletonsInstantiated() {
Collection<GlobalChannelInterceptorWrapper> interceptors = this.beanFactory.getBeansOfType(GlobalChannelInterceptorWrapper.class).values();
if (CollectionUtils.isEmpty(interceptors)) {
logger.debug("No global channel interceptors.");
} else {
for (GlobalChannelInterceptorWrapper channelInterceptor : interceptors) {
if (channelInterceptor.getOrder() >= 0) {
this.positiveOrderInterceptors.add(channelInterceptor);
} else {
this.negativeOrderInterceptors.add(channelInterceptor);
}
}
Map<String, ChannelInterceptorAware> channels = this.beanFactory.getBeansOfType(ChannelInterceptorAware.class);
for (Entry<String, ChannelInterceptorAware> entry : channels.entrySet()) {
addMatchingInterceptors(entry.getValue(), entry.getKey());
}
}
// TODO Remove this logic in 5.1
Properties integrationProperties = IntegrationContextUtils.getIntegrationProperties(this.beanFactory);
this.singletonsInstantiated = Boolean.parseBoolean(integrationProperties.getProperty(IntegrationProperties.POST_PROCESS_DYNAMIC_BEANS));
}
use of org.springframework.integration.context.IntegrationProperties in project spring-integration by spring-projects.
the class MessagingTemplate method sendAndReceive.
@Override
public Message<?> sendAndReceive(MessageChannel destination, Message<?> requestMessage) {
if (!this.throwExceptionOnLateReplySet) {
synchronized (this) {
if (!this.throwExceptionOnLateReplySet) {
Properties integrationProperties = IntegrationContextUtils.getIntegrationProperties(this.beanFactory);
Boolean throwExceptionOnLateReply = Boolean.valueOf(integrationProperties.getProperty(IntegrationProperties.THROW_EXCEPTION_ON_LATE_REPLY));
super.setThrowExceptionOnLateReply(throwExceptionOnLateReply);
this.throwExceptionOnLateReplySet = true;
}
}
}
return super.sendAndReceive(destination, requestMessage);
}
Aggregations