use of org.codice.ddf.catalog.async.plugin.api.internal.PostProcessPlugin in project ddf by codice.
the class InMemoryProcessingFramework method submitCreate.
@Override
public void submitCreate(ProcessRequest<ProcessCreateItem> input) {
if (postProcessPlugins == null || postProcessPlugins.isEmpty()) {
LOGGER.debug("postProcessPlugins is empty. Not starting post process thread");
} else {
threadPool.submit(() -> {
ProcessRequest<ProcessCreateItem> request = input;
for (PostProcessPlugin plugin : postProcessPlugins) {
try {
request = plugin.processCreate(request);
} catch (PluginExecutionException e) {
LOGGER.debug("Unable to process create request through plugin: {}", plugin.getClass().getCanonicalName(), e);
}
}
storeProcessRequest(request);
closeInputStream(request);
});
}
}
use of org.codice.ddf.catalog.async.plugin.api.internal.PostProcessPlugin in project ddf by codice.
the class InMemoryProcessingFramework method submitUpdate.
@Override
public void submitUpdate(ProcessRequest<ProcessUpdateItem> input) {
if (postProcessPlugins == null || postProcessPlugins.isEmpty()) {
LOGGER.debug("postProcessPlugins is empty. Not starting post process thread");
} else {
threadPool.submit(() -> {
ProcessRequest<ProcessUpdateItem> request = input;
for (PostProcessPlugin plugin : postProcessPlugins) {
try {
request = plugin.processUpdate(request);
} catch (PluginExecutionException e) {
LOGGER.debug("Unable to process update request through plugin: {}", plugin.getClass().getCanonicalName(), e);
}
}
storeProcessRequest(request);
closeInputStream(request);
});
}
}
Aggregations