@Test @DisplayName("create validator once") void createValidatorOnce() { EnvelopeValidator<EventEnvelope> validator = eventBus.validator(); assertNotNull(validator); assertSame(validator, eventBus.validator()); }
@Override protected EnvelopeValidator<EventEnvelope> validator() { if (eventValidator == null) { eventValidator = new EventValidator(); } return eventValidator; }
EventBus extends MulticastBus<Event, EventEnvelope, EventClass, EventDispatcher> implements ContextAware { @Override protected EnvelopeValidator<EventEnvelope> validator() { if (eventValidator == null) { eventValidator = new EventValidator(); } return eventValidator; } }
EventBus extends MulticastBus<Event, EventEnvelope, EventClass, EventDispatcher> implements ContextAware { @Override protected EnvelopeValidator<EventEnvelope> validator() { if (eventValidator == null) { eventValidator = new EventValidator(); } return eventValidator; } private  EventBus(Builder builder); }
EventBus extends MulticastBus<Event, EventEnvelope, EventClass, EventDispatcher> implements ContextAware { @Override protected EnvelopeValidator<EventEnvelope> validator() { if (eventValidator == null) { eventValidator = new EventValidator(); } return eventValidator; } private  EventBus(Builder builder); static Builder newBuilder(); final Set<EventClass> registeredEventClasses(); EventStore eventStore(); final void post(Event event); final void post(Iterable<Event> events); @VisibleForTesting final Optional<Enricher> enricher(); @Override void close(); @Override @Internal void registerWith(BoundedContext context); @Override boolean isRegistered(); }
EventBus extends MulticastBus<Event, EventEnvelope, EventClass, EventDispatcher> implements ContextAware { @Override protected EnvelopeValidator<EventEnvelope> validator() { if (eventValidator == null) { eventValidator = new EventValidator(); } return eventValidator; } private  EventBus(Builder builder); static Builder newBuilder(); final Set<EventClass> registeredEventClasses(); EventStore eventStore(); final void post(Event event); final void post(Iterable<Event> events); @VisibleForTesting final Optional<Enricher> enricher(); @Override void close(); @Override @Internal void registerWith(BoundedContext context); @Override boolean isRegistered();  }