/** * Sets the {@link List} of {@link MessageDispatchInterceptor}s for {@link CommandMessage}s. * Are invoked when a command is being dispatched. * * @param dispatchInterceptors which are invoked when a command is being dispatched * @return the current Builder instance, for fluent interfacing */ public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { return dispatchInterceptors(asList(dispatchInterceptors)); }
/** * Instantiate an {@link AbstractCommandGateway} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link CommandBus} is not {@code null} and throws an {@link AxonConfigurationException} * if it is. * * @param builder the {@link Builder} used to instantiate a {@link AbstractCommandGateway} instance */ protected AbstractCommandGateway(Builder builder) { builder.validate(); this.commandBus = builder.commandBus; this.retryScheduler = builder.retryScheduler; this.dispatchInterceptors = builder.dispatchInterceptors; }
@Override public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder dispatchInterceptors( List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder retryScheduler(RetryScheduler retryScheduler) { super.retryScheduler(retryScheduler); return this; }
@Override public Builder retryScheduler(RetryScheduler retryScheduler) { super.retryScheduler(retryScheduler); return this; }
@Override public Builder dispatchInterceptors( List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
/** * Sets the {@link List} of {@link MessageDispatchInterceptor}s for {@link CommandMessage}s. * Are invoked when a command is being dispatched. * * @param dispatchInterceptors which are invoked when a command is being dispatched * @return the current Builder instance, for fluent interfacing */ public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { return dispatchInterceptors(asList(dispatchInterceptors)); }
@Override public Builder commandBus(CommandBus commandBus) { super.commandBus(commandBus); return this; }
@Override public Builder commandBus(CommandBus commandBus) { super.commandBus(commandBus); return this; }
@Override public Builder dispatchInterceptors( List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder commandBus(CommandBus commandBus) { super.commandBus(commandBus); return this; }
@Override public Builder retryScheduler(RetryScheduler retryScheduler) { super.retryScheduler(retryScheduler); return this; }
@Override public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
/** * Instantiate an {@link AbstractCommandGateway} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link CommandBus} is not {@code null} and throws an {@link AxonConfigurationException} * if it is. * * @param builder the {@link Builder} used to instantiate a {@link AbstractCommandGateway} instance */ protected AbstractCommandGateway(Builder builder) { builder.validate(); this.commandBus = builder.commandBus; this.retryScheduler = builder.retryScheduler; this.dispatchInterceptors = builder.dispatchInterceptors; }
@Override public Builder dispatchInterceptors( List<MessageDispatchInterceptor<? super CommandMessage<?>>> dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }
@Override public Builder retryScheduler(RetryScheduler retryScheduler) { super.retryScheduler(retryScheduler); return this; }
@Override public Builder dispatchInterceptors( MessageDispatchInterceptor<? super CommandMessage<?>>... dispatchInterceptors) { super.dispatchInterceptors(dispatchInterceptors); return this; }