
zed.deployer.executor.DefaultProcessExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zed-deployer Show documentation
Show all versions of zed-deployer Show documentation
A application used as an example on how to set up pushing
its components to the Central Repository.
package zed.deployer.executor;
import zed.deployer.manager.DeployablesManager;
import zed.deployer.manager.DeploymentDescriptor;
import java.util.List;
public class DefaultProcessExecutor implements ProcessExecutor {
private final DeployablesManager deployableManager;
private final List handlers;
public DefaultProcessExecutor(DeployablesManager deployableManager, List handlers) {
this.handlers = handlers;
this.deployableManager = deployableManager;
}
@Override
public String start(String deploymentId) {
DeploymentDescriptor descriptor = deployableManager.deployment(deploymentId);
for (ProcessExecutorHandler handler : handlers) {
if (handler.supports(descriptor.uri())) {
String pid = handler.start(deploymentId);
deployableManager.update(descriptor.pid(pid));
return pid;
}
}
throw new RuntimeException("No executor handler for URI: " + descriptor.uri());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy