} catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient();
} catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient();
} catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient();
} catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient();
} catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient();
/** * {@inheritDoc} */ @Override public void sendDataObjects(List<? extends DefaultData> measurements) throws ServerUnavailableException { if (!isConnected()) { throw new ServerUnavailableException(); } if ((null != measurements) && !measurements.isEmpty()) { try { AddDataObjects remote = new AddDataObjects(agentStorageService, measurements); remote.makeCall(); } catch (ExecutionException executionException) { // there should be no execution exception log.error("Could not send data objects", executionException); } catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient(); } throw e; } } }
/** * {@inheritDoc} */ @Override public void sendKeepAlive(final long platformId) throws ServerUnavailableException { if (!isConnected()) { throw new ServerUnavailableException(); } FailFastRemoteMethodCall<IKeepAliveService, Void> call = new FailFastRemoteMethodCall<IKeepAliveService, Void>(keepAliveService) { @Override protected Void performRemoteCall(IKeepAliveService service) { service.sendKeepAlive(platformId); return null; } }; try { call.makeCall(); } catch (ExecutionException e) { // there should be no execution exception log.error("Exception thrown while trying to send keep-alive signal to the server.", e); } catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient(); } throw e; } }
/** * {@inheritDoc} */ @Override public void instrumentationApplied(final long platformIdent, Map<Long, long[]> methodToSensorMap) throws ServerUnavailableException { if (!isConnected()) { throw new ServerUnavailableException(); } if (MapUtils.isNotEmpty(methodToSensorMap)) { try { InstrumentationAppliedCall call = new InstrumentationAppliedCall(agentService, platformIdent, methodToSensorMap); call.makeCall(); } catch (ExecutionException executionException) { // there should be no execution exception log.error("Could not sent instrumented method ids", executionException); } catch (ServerUnavailableException e) { if (!e.isServerTimeout()) { disconnectClient(); } throw e; } } }