initial implementation of AMQP channels

This commit is contained in:
Mark Fisher
2011-10-06 13:14:06 -04:00
parent d373f90bd7
commit 18f9fe6810
13 changed files with 1125 additions and 109 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 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.
@@ -25,6 +25,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.integration.core.MessageHandler;
import org.springframework.util.Assert;
/**
* Base class for {@link MessageDispatcher} implementations.
@@ -61,6 +62,7 @@ public abstract class AbstractDispatcher implements MessageDispatcher {
* @return the result of {@link Set#add(Object)}
*/
public boolean addHandler(MessageHandler handler) {
Assert.notNull(handler, "handler must not be null");
return this.handlers.add(handler);
}
@@ -70,6 +72,7 @@ public abstract class AbstractDispatcher implements MessageDispatcher {
* @return the result of {@link Set#remove(Object)}
*/
public boolean removeHandler(MessageHandler handler) {
Assert.notNull(handler, "handler must not be null");
return this.handlers.remove(handler);
}