@Test void configureShouldAddMailboxListenersWhenConfigurationIsGood() throws Exception { XMLConfiguration configuration = toConfigutation("<listeners>" + "<listener>" + "<class>org.apache.james.modules.mailbox.NoopMailboxListener</class>" + "</listener>" + "</listeners>"); testee.configure(configuration); assertThat(eventBus.registeredGroups()).containsExactly(NoopMailboxListener.GROUP); }
@Override public void configure(HierarchicalConfiguration<ImmutableNode> configuration) { configure(ListenersConfiguration.from(configuration)); }
MailboxListenersLoaderImpl implements Configurable, MailboxListenersLoader { @Override public void configure(HierarchicalConfiguration<ImmutableNode> configuration) { configure(ListenersConfiguration.from(configuration)); } }
MailboxListenersLoaderImpl implements Configurable, MailboxListenersLoader { @Override public void configure(HierarchicalConfiguration<ImmutableNode> configuration) { configure(ListenersConfiguration.from(configuration)); } @Inject  MailboxListenersLoaderImpl(MailboxListenerFactory mailboxListenerFactory, EventBus eventBus,
                               Set<MailboxListener.ReactiveGroupMailboxListener> guiceDefinedListeners,
                               Set<MailboxListener.GroupMailboxListener> nonReactiveGuiceDefinedListeners); }
MailboxListenersLoaderImpl implements Configurable, MailboxListenersLoader { @Override public void configure(HierarchicalConfiguration<ImmutableNode> configuration) { configure(ListenersConfiguration.from(configuration)); } @Inject  MailboxListenersLoaderImpl(MailboxListenerFactory mailboxListenerFactory, EventBus eventBus,
                               Set<MailboxListener.ReactiveGroupMailboxListener> guiceDefinedListeners,
                               Set<MailboxListener.GroupMailboxListener> nonReactiveGuiceDefinedListeners); @Override void configure(HierarchicalConfiguration<ImmutableNode> configuration); void configure(ListenersConfiguration listenersConfiguration); @Override void register(Pair<Group, MailboxListener.ReactiveMailboxListener> listener); @Override Pair<Group, MailboxListener.ReactiveMailboxListener> createListener(ListenerConfiguration configuration); }
MailboxListenersLoaderImpl implements Configurable, MailboxListenersLoader { @Override public void configure(HierarchicalConfiguration<ImmutableNode> configuration) { configure(ListenersConfiguration.from(configuration)); } @Inject  MailboxListenersLoaderImpl(MailboxListenerFactory mailboxListenerFactory, EventBus eventBus,
                               Set<MailboxListener.ReactiveGroupMailboxListener> guiceDefinedListeners,
                               Set<MailboxListener.GroupMailboxListener> nonReactiveGuiceDefinedListeners); @Override void configure(HierarchicalConfiguration<ImmutableNode> configuration); void configure(ListenersConfiguration listenersConfiguration); @Override void register(Pair<Group, MailboxListener.ReactiveMailboxListener> listener); @Override Pair<Group, MailboxListener.ReactiveMailboxListener> createListener(ListenerConfiguration configuration);  }