/** * Shuts down the event publisher if we actually started it (As opposed to * having it dependency-injected). */ public void stop() { if (this.eventPublisher != null && this.shutdownEventPublisher) { this.eventPublisher.stop(); } }
/** * Publish target event to {@link EventPublisher} * * @param eb * current builder */ private void publish(EventBuilder eb) { ff4j.getEventPublisher().publish(eb.build()); }
eventPublisher = new EventPublisher(eventRepository); this.shutdownEventPublisher = true;
/** * Publish target event to {@link EventPublisher} * * @param eb * current builder */ private void publish(EventBuilder eb) { ff4j.getEventPublisher().publish(eb.build()); }
/** * Send target event to audit if expected. * * @param uid * feature unique identifier * @param checked * if the feature is checked or not */ private void publishCheck(String uid, boolean checked) { if (isEnableAudit()) { getEventPublisher().publish(new EventBuilder(this) .feature(uid) .action(checked ? ACTION_CHECK_OK : ACTION_CHECK_OFF) .build()); } }