The @MessageTarget annotation is now used with @ChannelAdapter (like @PollableSource) instead of @MessageEndpoint.

This commit is contained in:
Mark Fisher
2008-08-12 20:49:55 +00:00
parent d0581e881f
commit ead292fd1f
2 changed files with 13 additions and 29 deletions

View File

@@ -162,14 +162,13 @@ public class MessagingAnnotationPostProcessorTests {
@Test
public void testTargetAnnotation() throws InterruptedException {
MessageBus messageBus = new DefaultMessageBus();
QueueChannel testChannel = new QueueChannel();
messageBus.registerChannel("testChannel", testChannel);
MessagingAnnotationPostProcessor postProcessor = new MessagingAnnotationPostProcessor(messageBus);
postProcessor.afterPropertiesSet();
CountDownLatch latch = new CountDownLatch(1);
TargetAnnotationTestBean testBean = new TargetAnnotationTestBean(latch);
postProcessor.postProcessAfterInitialization(testBean, "testBean");
messageBus.start();
MessageChannel testChannel = messageBus.lookupChannel("testChannel");
testChannel.send(new StringMessage("foo"));
latch.await(1000, TimeUnit.MILLISECONDS);
assertEquals(0, latch.getCount());
@@ -399,7 +398,7 @@ public class MessagingAnnotationPostProcessorTests {
}
@MessageEndpoint(input="testChannel")
@ChannelAdapter("testChannel")
private static class TargetAnnotationTestBean {
private String messageText;