@SuppressWarnings({"unchecked"}) @Test void testFilterBlocksEvents() { testSubject = new OutboundEventMessageChannelAdapter(mockEventBus, mockChannel, m -> !m.getPayloadType().isAssignableFrom(Class.class)); testSubject.handle(singletonList(newDomainEvent())); verify(mockEventBus, never()).publish(isA(EventMessage.class)); }
protected void handle(List<? extends EventMessage<?>> events) { events.stream() .filter(filter::test) .forEach(event -> channel.send(transform(event))); }
OutboundEventMessageChannelAdapter implements InitializingBean { protected void handle(List<? extends EventMessage<?>> events) { events.stream() .filter(filter::test) .forEach(event -> channel.send(transform(event))); } }
OutboundEventMessageChannelAdapter implements InitializingBean { protected void handle(List<? extends EventMessage<?>> events) { events.stream() .filter(filter::test) .forEach(event -> channel.send(transform(event))); } OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter,
                                              EventMessageConverter eventMessageConverter); }
OutboundEventMessageChannelAdapter implements InitializingBean { protected void handle(List<? extends EventMessage<?>> events) { events.stream() .filter(filter::test) .forEach(event -> channel.send(transform(event))); } OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter,
                                              EventMessageConverter eventMessageConverter); @Override void afterPropertiesSet(); }
OutboundEventMessageChannelAdapter implements InitializingBean { protected void handle(List<? extends EventMessage<?>> events) { events.stream() .filter(filter::test) .forEach(event -> channel.send(transform(event))); } OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter);  OutboundEventMessageChannelAdapter(SubscribableMessageSource<EventMessage<?>> messageSource,
                                              MessageChannel channel, Predicate<? super EventMessage<?>> filter,
                                              EventMessageConverter eventMessageConverter); @Override void afterPropertiesSet();  }