Updated the annotation-based Cafe Demo to use a bridge element since the annotated-methods in Barista now require a SubscribableChannel.

This commit is contained in:
Mark Fisher
2008-11-25 21:00:11 +00:00
parent dbc079ebe6
commit db09791428
3 changed files with 19 additions and 12 deletions

View File

@@ -74,7 +74,7 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
if (StringUtils.hasText(inputChannelName)) {
MessageChannel inputChannel = this.channelResolver.resolveChannelName(inputChannelName);
Assert.notNull(inputChannel, "failed to resolve inputChannel '" + inputChannelName + "'");
Assert.isInstanceOf(SubscribableChannel.class, inputChannel,
Assert.isTrue(inputChannel instanceof SubscribableChannel,
"The input channel for an Annotation-based endpoint must be a SubscribableChannel.");
endpoint = new EventDrivenConsumer((SubscribableChannel) inputChannel, handler);
if (handler instanceof BeanFactoryAware) {