
entry-point.async-event-handler.events-handler.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
package {{package}}.events.handlers;
{{#lombok}}
import lombok.AllArgsConstructor;
{{/lombok}}
import org.reactivecommons.api.domain.DomainEvent;
import org.reactivecommons.async.impl.config.annotations.EnableEventListeners;
import reactor.core.publisher.Mono;
{{#eda}}
import io.cloudevents.CloudEvent;
{{/eda}}
{{#lombok}}
@AllArgsConstructor
{{/lombok}}
@EnableEventListeners
public class EventsHandler {
// private final SampleUseCase sampleUseCase;
{{^lombok}}
public EventsHandler(/*SampleUseCase sampleUseCase*/) {
//this.sampleUseCase = sampleUseCase;
}
{{/lombok}}
{{#eda}}
public Mono handleEventA(DomainEvent event) {
System.out.println("event received: " + event.getName() + " ->" + event.getData()); // TODO: Remove this line
// return sampleUseCase.doSomething(event.getData());
return Mono.empty();
}
{{/eda}}
{{^eda}}
public Mono handleEventA(DomainEvent event) {
System.out.println("event received: " + event.getName() + " ->" + event.getData()); // TODO: Remove this line
// return sampleUseCase.doSomething(event.getData());
return Mono.empty();
}
{{/eda}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy