@Override public void accept(byte[] message) { try { channel.basicPublish(exchangeName, routingKey, null, message); } catch (final IOException e) { monitor.warn("Failed to publish message", e); } } }
protected void addMapping(final String externalId, final String id) { if (ids.containsKey(externalId)) { getMonitor().warn("Duplicate external id {} added, previous will be discarded", externalId); } ids.put(externalId, id); } }
protected void addMapping(final String externalId, final String id) { if (ids.containsKey(externalId)) { getMonitor().warn("Duplicate external id {} added, previous will be discarded", externalId); } ids.put(externalId, id); } }
@SuppressWarnings({"rawtypes", "unchecked"}) private void addSingleProperty( Element v, String key, List<?> values, ValueStrategy valueStrategy) { try { Optional value = valueStrategy.aggregate(values); if (value.isPresent()) { setProperty(v, key, value.get()); } } catch (Exception e) { monitor.warn("Error while aggregated property " + key + " from " + values.toString(), e); } }
@SuppressWarnings({"rawtypes", "unchecked"}) private void addSingleProperty( Element v, String key, List<?> values, ValueStrategy valueStrategy) { try { Optional value = valueStrategy.aggregate(values); if (value.isPresent()) { setProperty(v, key, value.get()); } } catch (Exception e) { monitor.warn("Error while aggregated property " + key + " from " + values.toString(), e); } }
private void initialiseMappers(UimaContext context) { mappers.forEach( m -> { try { m.initialize(context); } catch (Exception e) { getMonitor().warn("Unable to initialse content mapper: {}", e); } }); }
private void initialiseMappers(UimaContext context) { mappers.forEach( m -> { try { m.initialize(context); } catch (Exception e) { getMonitor().warn("Unable to initialse content mapper: {}", e); } }); }
private void initialiseManipulators(UimaContext context) { manipulators.forEach( m -> { try { m.initialize(context); } catch (Exception e) { getMonitor().warn("Unable to initialse content manipulator: {}", e); } }); }
private void writeRow( CsvInteractionWriter writer, InteractionDefinition interaction, Set<String> alternatives) { try { writer.write(interaction, alternatives); } catch (final Exception e) { getMonitor().warn("Unable to write CSV row", e); } }
private void doClose() { try { g.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + g.configuration(), e); } finally { g = null; } } }
@Override protected void doDestroy() { try { closeQueue(); } catch (IOException e) { getMonitor().warn("Error closing queue", e); } super.doDestroy(); }
@Override public void destroy() { super.destroy(); try { close(); } catch (IOException e) { getMonitor().warn("Close on destroy", e); } }
private void doClose() { try { g.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + g.configuration(), e); } finally { g = null; } } }
@Override protected void doDestroy() { try { candidateSupplier.close(); } catch (Exception e) { getMonitor().warn("Error closing resources", e); } super.doDestroy(); } }
@Override public void destroy() { super.destroy(); try { close(); } catch (IOException e) { getMonitor().warn("Close on destroy", e); } }
@Override public void destroy() { super.destroy(); try { doDestroy(); } catch (final IOException e) { getMonitor().warn("Close on destroy", e); } }
private void doClose() { try { g.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + g.configuration(), e); } finally { g = null; } } }
@Override protected void doDestroy() { try { driver.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + createGraph().configuration(), e); } super.doDestroy(); } }
@Override protected void doDestroy() { try { driver.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + createGraph().configuration(), e); } super.doDestroy(); } }
@Override protected void doDestroy() { try { driver.close(); } catch (Exception e) { getMonitor().warn("Error closing graph " + createGraph().configuration(), e); } super.doDestroy(); } }