/** * Safely end bridge loop. This routine should only be called from the shutdown hook thread in the main part of a * server. In other cases it will result in strange runtime errors. * * @throws ConnectorDataTransmissionException * An error occurred during data transmission and in this particular case while closing the data * transmission. */ public void shutdown() throws ConnectorDataTransmissionException { this.active = false; this.respawn = false; this.service.close(); this.kiekerMonitoringController.terminateMonitoring(); }
/** * Safely end bridge loop. This routine should only be called from the shutdown hook thread in the main part of a * server. In other cases it will result in strange runtime errors. * * @throws ConnectorDataTransmissionException * An error occurred during data transmission and in this particular case while closing the data * transmission. */ public void shutdown() throws ConnectorDataTransmissionException { this.active = false; this.respawn = false; this.service.close(); this.kiekerMonitoringController.terminateMonitoring(); }
/** * Close a service connector and trigger a failure on errors. * * @param numberOfRecords * number of expected records */ protected void close(final int numberOfRecords) { try { LOGGER.info("Terminate connector {}", this.connector.getClass().toString()); this.connector.close(); } catch (final ConnectorDataTransmissionException e) { Assert.fail("Connector termination failed: " + e.getMessage()); } Assert.assertEquals("Number of send records is not equal to number of received records", numberOfRecords, this.getRecordCount()); }
this.service.close(); } while (this.respawn);
this.service.close(); } while (this.respawn);