com.opencredo.concourse.domain.commands.dispatching.SynchronousCommandExecutor Maven / Gradle / Ivy
package com.opencredo.concourse.domain.commands.dispatching;
import com.opencredo.concourse.domain.commands.Command;
import com.opencredo.concourse.domain.commands.CommandResult;
import java.time.Instant;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
public final class SynchronousCommandExecutor implements CommandExecutor {
public static SynchronousCommandExecutor processingWith(CommandProcessor commandProcessor) {
return new SynchronousCommandExecutor(commandProcessor);
}
private final CommandProcessor commandProcessor;
private SynchronousCommandExecutor(CommandProcessor commandProcessor) {
this.commandProcessor = commandProcessor;
}
@Override
public void accept(Command command, CompletableFuture future) {
try {
Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy