INT-1489 removed SimpleMessageProducingHandlerMetrics
This commit is contained in:
@@ -24,6 +24,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import org.aopalliance.aop.Advice;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.aop.Advisor;
|
||||
import org.springframework.aop.PointcutAdvisor;
|
||||
import org.springframework.aop.TargetSource;
|
||||
@@ -42,7 +43,6 @@ import org.springframework.context.SmartLifecycle;
|
||||
import org.springframework.integration.MessageChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.core.MessageHandler;
|
||||
import org.springframework.integration.core.MessageProducer;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.integration.core.PollableChannel;
|
||||
import org.springframework.integration.endpoint.AbstractEndpoint;
|
||||
@@ -180,17 +180,12 @@ public class IntegrationMBeanExporter extends MBeanExporter implements BeanPostP
|
||||
}
|
||||
|
||||
if (bean instanceof MessageHandler) {
|
||||
SimpleMessageHandlerMetrics monitor = null;
|
||||
if (bean instanceof MessageProducer) {
|
||||
// We need to maintain semantics of the handler also being a producer
|
||||
monitor = new SimpleMessageProducingHandlerMetrics((MessageHandler) bean);
|
||||
} else {
|
||||
monitor = new SimpleMessageHandlerMetrics((MessageHandler) bean);
|
||||
}
|
||||
SimpleMessageHandlerMetrics monitor = new SimpleMessageHandlerMetrics((MessageHandler) bean);
|
||||
Object advised = applyHandlerInterceptor(bean, monitor, beanClassLoader);
|
||||
handlers.add(monitor);
|
||||
return advised;
|
||||
} else if (bean instanceof MessageSource<?>) {
|
||||
}
|
||||
else if (bean instanceof MessageSource<?>) {
|
||||
SimpleMessageSourceMetrics monitor = new SimpleMessageSourceMetrics((MessageSource<?>) bean);
|
||||
Object advised = applySourceInterceptor(bean, monitor, beanClassLoader);
|
||||
sources.add(monitor);
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.integration.monitor;
|
||||
|
||||
import org.springframework.integration.MessageChannel;
|
||||
import org.springframework.integration.core.MessageHandler;
|
||||
import org.springframework.integration.core.MessageProducer;
|
||||
import org.springframework.jmx.export.annotation.ManagedResource;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
* @since 2.0
|
||||
*
|
||||
*/
|
||||
@ManagedResource
|
||||
public class SimpleMessageProducingHandlerMetrics extends SimpleMessageHandlerMetrics implements MessageProducer {
|
||||
|
||||
public SimpleMessageProducingHandlerMetrics(MessageHandler handler) {
|
||||
super(handler);
|
||||
}
|
||||
|
||||
public void setOutputChannel(MessageChannel outputChannel) {
|
||||
((MessageProducer)this.getMessageHandler()).setOutputChannel(outputChannel);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user