public SnmpMultiResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
@Override public void sendResponse(String message) { // restore Logging context on callback. try (MDCCloseable mdc = Logging.withContextMapCloseable(loggingContext)) { // When message is not null, it's called from kafka consumer otherwise it is from timeout tracker. if (message != null) { T response = rpcModule.unmarshalResponse(message); if (response.getErrorMessage() != null) { responseFuture.completeExceptionally(new RemoteExecutionException(response.getErrorMessage())); } else { responseFuture.complete(response); } isProcessed = true; } else { responseFuture.completeExceptionally(new RequestTimedOutException(new TimeoutException())); } rpcResponseMap.remove(rpcId); messageCache.remove(rpcId); } catch (Exception e) { LOG.warn("error while handling response for RPC request id {}", rpcId, e); } }
@Override public void sendResponse(String message) { // restore Logging context on callback. try (MDCCloseable mdc = Logging.withContextMapCloseable(loggingContext)) { // When message is not null, it's called from kafka consumer otherwise it is from timeout tracker. if (message != null) { T response = rpcModule.unmarshalResponse(message); if (response.getErrorMessage() != null) { responseFuture.completeExceptionally(new RemoteExecutionException(response.getErrorMessage())); } else { responseFuture.complete(response); } isProcessed = true; } else { responseFuture.completeExceptionally(new RequestTimedOutException(new TimeoutException())); } rpcResponseMap.remove(rpcId); messageCache.remove(rpcId); } catch (Exception e) { LOG.warn("error while handling response for RPC request id {}", rpcId, e); } }
public PollerResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
public DnsLookupResponseDTO(Throwable ex) { error = RemoteExecutionException.toErrorMessage(ex); }
public SnmpMultiResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
public PingResponseDTO(Throwable ex) { error = RemoteExecutionException.toErrorMessage(ex); }
public PingSweepResponseDTO(Throwable ex) { error = RemoteExecutionException.toErrorMessage(ex); }
public EchoResponse(Throwable t) { this.error = RemoteExecutionException.toErrorMessage(t); }
public RequisitionResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
public CollectorResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
public CollectorResponseDTO(Throwable ex) { this.error = RemoteExecutionException.toErrorMessage(ex); }
public DetectorResponseDTO(Throwable t) { setDetected(false); error = RemoteExecutionException.toErrorMessage(t); }