String serverName = getServerName(memoryImprint);
if (serverName != null) {
IGerritHudsonTriggerConfig config = getConfig(serverName);
if (config != null) {
if (config.isUseRestApi()) {
GerritSendCommandQueue.queue(new BuildCompletedRestCommandJob(config, memoryImprint, listener));
} else {
GerritSendCommandQueue.queue(new BuildCompletedCommandJob(config, memoryImprint, listener));
}
} else {
logger.warn("Nothing queued since there is no configuration for serverName: {}", serverName);