
entry-point.async-event-handler.commands-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.Command;
import org.reactivecommons.async.impl.config.annotations.EnableCommandListeners;
import reactor.core.publisher.Mono;
{{#eda}}
import io.cloudevents.CloudEvent;
{{/eda}}
{{#lombok}}
@AllArgsConstructor
{{/lombok}}
@EnableCommandListeners
public class CommandsHandler {
// private final SampleUseCase sampleUseCase;
{{^lombok}}
public CommandsHandler(/*SampleUseCase sampleUseCase*/) {
//this.sampleUseCase = sampleUseCase;
}
{{/lombok}}
{{#eda}}
public Mono handleCommandA(Command command) {
System.out.println("command received: " + command.getName() + " ->" + command.getData()); // TODO: Remove this line
// return sampleUseCase.doSomething(command.getData());
return Mono.empty();
}
{{/eda}}
{{^eda}}
public Mono handleCommandA(Command command) {
System.out.println("command received: " + command.getName() + " ->" + command.getData()); // TODO: Remove this line
// return sampleUseCase.doSomething(command.getData());
return Mono.empty();
}
{{/eda}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy