com.opencredo.concourse.domain.commands.dispatching.DispatchingCommandProcessor Maven / Gradle / Ivy
package com.opencredo.concourse.domain.commands.dispatching;
import com.opencredo.concourse.domain.commands.Command;
import com.opencredo.concourse.domain.commands.CommandType;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import static com.google.common.base.Preconditions.checkNotNull;
public final class DispatchingCommandProcessor implements CommandProcessor, CommandSubscribable {
public static DispatchingCommandProcessor create() {
return new DispatchingCommandProcessor(new ConcurrentHashMap<>());
}
private final ConcurrentMap processorRegistry;
private DispatchingCommandProcessor(ConcurrentMap processorRegistry) {
this.processorRegistry = processorRegistry;
}
@Override
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy