public void notifyCompleted(final boolean success) { log.info("Completed - layer:", layerId, "type:", type, "success:", success); Map<String, Object> output = createCommonResponse("completed"); output.put("success", success); output.put("type", type.toString()); this.service.addResults(session.getClient(), ResultProcessor.CHANNEL_STATUS, output); }
public void sendCommonErrorResponse(final String message, final boolean once) { Map<String, Object> output = createCommonResponse(message); if (once) { output.put(OUTPUT_ONCE, once); } this.service.addResults(session.getClient(), ResultProcessor.CHANNEL_ERROR, output); }
/** Send image parsing error */ protected void imageParsingFailed(final String message) { log.debug("Image parsing failed"); Map<String, Object> output = new HashMap<String, Object>(); output.put(OUTPUT_LAYER_ID, this.layerId); output.put(OUTPUT_ONCE, true); output.put(OUTPUT_MESSAGE, message); this.service.addResults(session.getClient(), ResultProcessor.CHANNEL_ERROR, output); }
public void notifyError(String error) { if (error == null) { error = "Something went wrong"; } log.error("On Error - layer:", layerId, "type:", type, "msg:", error); Map<String, Object> output = createCommonResponse(error); output.put("type", type.toString()); this.service.addResults(session.getClient(), ResultProcessor.CHANNEL_ERROR, output); }
public void notifyStart() { log.info("On start - layer:", layerId, "type:", type); this.service.addResults( session.getClient(), ResultProcessor.CHANNEL_STATUS, createCommonResponse("started")); }