@Test(timeout = 60000) public void testPublishingEnabled() throws Exception { assertThat("Publishing enabled with no listeners", holderRule.getHolder().publishingEnabled(), is(false)); ListenerWithSub l1 = holderRule.addAListener(); assertThat("Publishing disabled with a listener", holderRule.getHolder().publishingEnabled(), is(true)); l1.subscription.unsubscribe(); assertThat("Listener not removed on unsubscribe.", holderRule.getHolder().getAllListeners(), is(empty())); assertThat("Publishing enabled post listener unsubscribe", holderRule.getHolder().publishingEnabled(), is(false)); }
@Override public boolean publishingEnabled() { return !RxNetty.isEventPublishingDisabled() && !listeners.isEmpty(); }
ListenersHolder implements EventSource<T>, EventPublisher { @Override public boolean publishingEnabled() { return !RxNetty.isEventPublishingDisabled() && !listeners.isEmpty(); } }
ListenersHolder implements EventSource<T>, EventPublisher { @Override public boolean publishingEnabled() { return !RxNetty.isEventPublishingDisabled() && !listeners.isEmpty(); } ListenersHolder();  ListenersHolder(ListenersHolder<T> toCopy); }
ListenersHolder implements EventSource<T>, EventPublisher { @Override public boolean publishingEnabled() { return !RxNetty.isEventPublishingDisabled() && !listeners.isEmpty(); } ListenersHolder();  ListenersHolder(ListenersHolder<T> toCopy); @Override Subscription subscribe(final T listener); @Override boolean publishingEnabled(); void dispose(); void invokeListeners(Action1<T> invocationAction); void invokeListeners(Action3<T, Long, TimeUnit> invocationAction, long duration, TimeUnit timeUnit); void invokeListeners(Action4<T, Long, TimeUnit, Throwable> invocationAction, long duration,
                                TimeUnit timeUnit, Throwable throwable); void invokeListeners(Action4<T, Long, TimeUnit, A> invocationAction, long duration,
                                    TimeUnit timeUnit, A arg); void invokeListeners(Action5<T, Long, TimeUnit, Throwable, A> invocationAction, long duration,
                                    TimeUnit timeUnit, Throwable throwable, A arg); void invokeListeners(Action2<T, A> invocationAction, A arg); void invokeListeners(Action3<T, Throwable, A> invocationAction, Throwable throwable, A arg); ListenersHolder<T> copy(); void subscribeAllTo(EventSource<T> lazySource); }
ListenersHolder implements EventSource<T>, EventPublisher { @Override public boolean publishingEnabled() { return !RxNetty.isEventPublishingDisabled() && !listeners.isEmpty(); } ListenersHolder();  ListenersHolder(ListenersHolder<T> toCopy); @Override Subscription subscribe(final T listener); @Override boolean publishingEnabled(); void dispose(); void invokeListeners(Action1<T> invocationAction); void invokeListeners(Action3<T, Long, TimeUnit> invocationAction, long duration, TimeUnit timeUnit); void invokeListeners(Action4<T, Long, TimeUnit, Throwable> invocationAction, long duration,
                                TimeUnit timeUnit, Throwable throwable); void invokeListeners(Action4<T, Long, TimeUnit, A> invocationAction, long duration,
                                    TimeUnit timeUnit, A arg); void invokeListeners(Action5<T, Long, TimeUnit, Throwable, A> invocationAction, long duration,
                                    TimeUnit timeUnit, Throwable throwable, A arg); void invokeListeners(Action2<T, A> invocationAction, A arg); void invokeListeners(Action3<T, Throwable, A> invocationAction, Throwable throwable, A arg); ListenersHolder<T> copy(); void subscribeAllTo(EventSource<T> lazySource);  }