/** * Implements the deserializeNextRecord interface. Fetches deserialized data from the recordQeue * which is filled by the connection listener threads. * * @throws ConnectorDataTransmissionException * if the record reading is interrupted * @throws ConnectorEndOfDataException * if end of all data streams are reached * @return one IMonitoringRecord per call */ @Override public IMonitoringRecord deserializeNextRecord() throws ConnectorDataTransmissionException, ConnectorEndOfDataException { try { return this.recordQueue.take(); } catch (final InterruptedException e) { if (this.recordQueue.isEmpty()) { throw new ConnectorEndOfDataException("End of all streams reached", e); } else { throw new ConnectorDataTransmissionException(e.getMessage(), e); } } }
/** * Implements the deserializeNextRecord interface. Fetches deserialized data from the recordQeue * which is filled by the connection listener threads. * * @throws ConnectorDataTransmissionException * if the record reading is interrupted * @throws ConnectorEndOfDataException * if end of all data streams are reached * @return one IMonitoringRecord per call */ @Override public IMonitoringRecord deserializeNextRecord() throws ConnectorDataTransmissionException, ConnectorEndOfDataException { try { return this.recordQueue.take(); } catch (final InterruptedException e) { if (this.recordQueue.isEmpty()) { throw new ConnectorEndOfDataException("End of all streams reached", e); } else { throw new ConnectorDataTransmissionException(e.getMessage(), e); } } }
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream during an read operation", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream during an read operation", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream during an read operation", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("End of stream", e); } catch (final java.io.EOFException e) { throw new ConnectorEndOfDataException("End of stream during an read operation", e); } catch (final IOException e) { throw new ConnectorDataTransmissionException("Read error", e);
throw new ConnectorEndOfDataException("No more records in the queue");
throw new ConnectorEndOfDataException("No more records in the queue");
/** * The assertions check whether the method is called after initialize() and beforE() close. * * @throws ConnectorDataTransmissionException * never, this is just API compatibility * @throws ConnectorEndOfDataException * when called more than END_NUMBER_OF_RECORDS times. * @return Returns an IMontoringRecord. */ @Override public IMonitoringRecord deserializeNextRecord() throws ConnectorDataTransmissionException, ConnectorEndOfDataException { Assert.assertTrue("Connector's deserializeNextRecord() method called before initialize() was called.", this.initialize); Assert.assertFalse("Connector's deserializeNextRecord() method called after close() was called.", this.close); if (this.count < ConfigurationParameters.SEND_NUMBER_OF_RECORDS) { this.count++; return new OperationExecutionRecord("kieker.bridge", OperationExecutionRecord.NO_SESSION_ID, 1, 0, 0, OperationExecutionRecord.NO_HOSTNAME, OperationExecutionRecord.NO_EOI_ESS, OperationExecutionRecord.NO_EOI_ESS); } else { throw new ConnectorEndOfDataException("End of data reached"); } }