All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.stapi.test.disabledImplementations.DisabledEventGateway Maven / Gradle / Ivy

There is a newer version: 0.2.3
Show newest version
package ai.stapi.test.disabledImplementations;

import java.util.List;
import org.axonframework.common.Registration;
import org.axonframework.eventhandling.EventMessage;
import org.axonframework.eventhandling.gateway.EventGateway;
import org.axonframework.messaging.MessageDispatchInterceptor;
import org.jetbrains.annotations.NotNull;

public class DisabledEventGateway implements EventGateway {

  @Override
  public void publish(@NotNull List events) {
    throw InvalidTestOperation.becauseTestCaseDoesntAllowPublishingEvents();
  }

  @Override
  public Registration registerDispatchInterceptor(
      @NotNull MessageDispatchInterceptor> dispatchInterceptor
  ) {
    return () -> false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy