name changes for consistent use of MessageSource, MessageProducer, and MessageHandler

This commit is contained in:
Mark Fisher
2010-03-08 22:00:52 +00:00
parent a807174118
commit 0df994819a
7 changed files with 18 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ import org.springframework.integration.message.OutboundMessageMapper;
import org.springframework.util.Assert;
/**
* Default Messaging Mapper implementation for the {@link NotificationPublishingAdapter}.
* Default Messaging Mapper implementation for the {@link NotificationPublishingMessageHandler}.
* If the Message has a String-typed payload, that will be passed as the 'message' of
* the Notification instance. Otherwise, the payload object will be passed as the
* 'userData' of the Notification instance.

View File

@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @since 2.0
*/
public class NotificationListeningAdapter extends MessageProducerSupport implements NotificationListener {
public class NotificationListeningMessageProducer extends MessageProducerSupport implements NotificationListener {
private final Log logger = LogFactory.getLog(this.getClass());

View File

@@ -41,7 +41,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @since 2.0
*/
public class NotificationPublishingAdapter extends AbstractMessageHandler implements BeanFactoryAware, InitializingBean {
public class NotificationPublishingMessageHandler extends AbstractMessageHandler implements BeanFactoryAware, InitializingBean {
private final PublisherDelegate delegate = new PublisherDelegate();
@@ -54,12 +54,12 @@ public class NotificationPublishingAdapter extends AbstractMessageHandler implem
private volatile ListableBeanFactory beanFactory;
public NotificationPublishingAdapter(ObjectName objectName) {
public NotificationPublishingMessageHandler(ObjectName objectName) {
Assert.notNull(objectName, "JMX ObjectName is required");
this.objectName = objectName;
}
public NotificationPublishingAdapter(String objectName) {
public NotificationPublishingMessageHandler(String objectName) {
Assert.notNull(objectName, "JMX ObjectName is required");
try {
this.objectName = ObjectNameManager.getInstance(objectName);

View File

@@ -53,7 +53,7 @@ import org.springframework.util.ObjectUtils;
* @author Oleg Zhurakousky
* @since 2.0
*/
public class OperationInvokingHandler extends AbstractReplyProducingMessageHandler implements InitializingBean {
public class OperationInvokingMessageHandler extends AbstractReplyProducingMessageHandler implements InitializingBean {
private volatile MBeanServer server;

View File

@@ -44,7 +44,7 @@ import org.springframework.jmx.support.ObjectNameManager;
* @author Mark Fisher
* @since 2.0
*/
public class NotificationListeningAdapterTests {
public class NotificationListeningMessageProducerTests {
private volatile MBeanServer server;
@@ -74,7 +74,7 @@ public class NotificationListeningAdapterTests {
@Test
public void simpleNotification() throws Exception {
QueueChannel outputChannel = new QueueChannel();
NotificationListeningAdapter adapter = new NotificationListeningAdapter();
NotificationListeningMessageProducer adapter = new NotificationListeningMessageProducer();
adapter.setServer(this.server);
adapter.setObjectNames(this.objectName);
adapter.setOutputChannel(outputChannel);
@@ -93,7 +93,7 @@ public class NotificationListeningAdapterTests {
@Test
public void notificationWithHandback() throws Exception {
QueueChannel outputChannel = new QueueChannel();
NotificationListeningAdapter adapter = new NotificationListeningAdapter();
NotificationListeningMessageProducer adapter = new NotificationListeningMessageProducer();
adapter.setServer(this.server);
adapter.setObjectNames(this.objectName);
adapter.setOutputChannel(outputChannel);
@@ -115,7 +115,7 @@ public class NotificationListeningAdapterTests {
@SuppressWarnings("serial")
public void notificationWithFilter() throws Exception {
QueueChannel outputChannel = new QueueChannel();
NotificationListeningAdapter adapter = new NotificationListeningAdapter();
NotificationListeningMessageProducer adapter = new NotificationListeningMessageProducer();
adapter.setServer(this.server);
adapter.setObjectNames(this.objectName);
adapter.setOutputChannel(outputChannel);

View File

@@ -39,7 +39,7 @@ import org.springframework.jmx.support.ObjectNameManager;
* @author Mark Fisher
* @since 2.0
*/
public class NotificationPublishingAdapterTests {
public class NotificationPublishingMessageHandlerTests {
private final StaticApplicationContext context = new StaticApplicationContext();
@@ -52,7 +52,7 @@ public class NotificationPublishingAdapterTests {
public void setup() throws Exception {
this.publisherObjectName = ObjectNameManager.getInstance("test:type=publisher");
context.registerSingleton("exporter", MBeanExporter.class);
RootBeanDefinition publisherDefinition = new RootBeanDefinition(NotificationPublishingAdapter.class);
RootBeanDefinition publisherDefinition = new RootBeanDefinition(NotificationPublishingMessageHandler.class);
publisherDefinition.getConstructorArgumentValues().addGenericArgumentValue(this.publisherObjectName);
publisherDefinition.getPropertyValues().add("defaultNotificationType", "test.type");
context.registerBeanDefinition("testPublisher", publisherDefinition);
@@ -70,7 +70,7 @@ public class NotificationPublishingAdapterTests {
@Test
public void simplePublish() {
NotificationPublishingAdapter adapter = context.getBean(NotificationPublishingAdapter.class);
NotificationPublishingMessageHandler adapter = context.getBean(NotificationPublishingMessageHandler.class);
assertEquals(0, this.listener.notifications.size());
adapter.handleMessage(new StringMessage("foo"));
assertEquals(1, this.listener.notifications.size());

View File

@@ -42,7 +42,7 @@ import org.springframework.jmx.support.ObjectNameManager;
* @author Oleg Zhurakousky
* @since 2.0
*/
public class OperationInvokingHandlerTests {
public class OperationInvokingMessageHandlerTests {
private final String objectName = "si:name=test";
@@ -67,7 +67,7 @@ public class OperationInvokingHandlerTests {
@Test
public void invocationWithMapPayload() throws Exception {
QueueChannel outputChannel = new QueueChannel();
OperationInvokingHandler handler = new OperationInvokingHandler();
OperationInvokingMessageHandler handler = new OperationInvokingMessageHandler();
handler.setServer(this.server);
handler.setDefaultObjectName(this.objectName);
handler.setOutputChannel(outputChannel);
@@ -86,7 +86,7 @@ public class OperationInvokingHandlerTests {
@Test
public void invocationWithPayloadNoReturnValue() throws Exception {
QueueChannel outputChannel = new QueueChannel();
OperationInvokingHandler handler = new OperationInvokingHandler();
OperationInvokingMessageHandler handler = new OperationInvokingMessageHandler();
handler.setServer(this.server);
handler.setDefaultObjectName(this.objectName);
handler.setOutputChannel(outputChannel);
@@ -99,7 +99,7 @@ public class OperationInvokingHandlerTests {
@Test(expected=MessagingException.class)
public void invocationWithMapPayloadNotEnoughParameters() throws Exception {
QueueChannel outputChannel = new QueueChannel();
OperationInvokingHandler handler = new OperationInvokingHandler();
OperationInvokingMessageHandler handler = new OperationInvokingMessageHandler();
handler.setServer(this.server);
handler.setDefaultObjectName(this.objectName);
handler.setOutputChannel(outputChannel);
@@ -117,7 +117,7 @@ public class OperationInvokingHandlerTests {
@Test
public void invocationWithListPayload() throws Exception {
QueueChannel outputChannel = new QueueChannel();
OperationInvokingHandler handler = new OperationInvokingHandler();
OperationInvokingMessageHandler handler = new OperationInvokingMessageHandler();
handler.setServer(this.server);
handler.setDefaultObjectName(this.objectName);
handler.setOutputChannel(outputChannel);