@Override protected void writeTransactionResponse(ResponseCode response, String explanation) throws IOException { if(explanation == null){ response.writeResponse(dos); } else { response.writeResponse(dos, explanation); } } }
protected void writeTransactionResponse(boolean isTransfer, ResponseCode response, CommunicationsSession commsSession, String explanation) throws IOException { final DataOutputStream dos = new DataOutputStream(commsSession.getOutput().getOutputStream()); if (explanation == null) { response.writeResponse(dos); } else { response.writeResponse(dos, explanation); } }
String clientChecksum = commSession.getChecksum(); logger.debug("readTransactionResponse. clientChecksum={}", clientChecksum); ResponseCode.CONFIRM_TRANSACTION.writeResponse(new DataOutputStream(bos), clientChecksum); break; case TRANSACTION_CONFIRMED: logger.debug("readTransactionResponse. finishing."); ResponseCode.TRANSACTION_FINISHED.writeResponse(new DataOutputStream(bos)); break; logger.debug("readTransactionResponse. returning CONTINUE_TRANSACTION."); ResponseCode.CONTINUE_TRANSACTION.writeResponse(new DataOutputStream(bos)); break; case TRANSACTION_CONFIRMED: logger.debug("readTransactionResponse. responseCode={}", responseCode); if(responseCode.containsMessage()){ responseCode.writeResponse(new DataOutputStream(bos), ""); } else { responseCode.writeResponse(new DataOutputStream(bos));
if(StringUtils.isEmpty(commSession.getChecksum())){ ResponseCode.CONTINUE_TRANSACTION.writeResponse(dos); } else { ResponseCode.CONFIRM_TRANSACTION.writeResponse(dos, ""); } else { TransactionResultEntity transactionResult if(responseCode.containsMessage()){ String message = transactionResult.getMessage(); responseCode.writeResponse(dos, message == null ? "" : message); } else { responseCode.writeResponse(dos); ResponseCode.CONFIRM_TRANSACTION.writeResponse(dos, commSession.getChecksum()); break; case TRANSACTION_CONFIRMED: ResponseCode responseCode = ResponseCode.fromCode(resultEntity.getResponseCode()); if(responseCode.containsMessage()){ responseCode.writeResponse(dos, resultEntity.getMessage()); } else { responseCode.writeResponse(dos);
ResponseCode handshakeResult = e.getResponseCode(); if(handshakeResult.containsMessage()){ handshakeResult.writeResponse(dos, e.getMessage()); } else { handshakeResult.writeResponse(dos); ResponseCode.PROPERTIES_OK.writeResponse(dos);
protected void writeTransactionResponse(boolean isTransfer, ResponseCode response, CommunicationsSession commsSession, String explanation) throws IOException { final DataOutputStream dos = new DataOutputStream(commsSession.getOutput().getOutputStream()); if (explanation == null) { response.writeResponse(dos); } else { response.writeResponse(dos, explanation); } }
String clientChecksum = commSession.getChecksum(); logger.debug("readTransactionResponse. clientChecksum={}", clientChecksum); ResponseCode.CONFIRM_TRANSACTION.writeResponse(new DataOutputStream(bos), clientChecksum); break; case TRANSACTION_CONFIRMED: logger.debug("readTransactionResponse. finishing."); ResponseCode.TRANSACTION_FINISHED.writeResponse(new DataOutputStream(bos)); break; logger.debug("readTransactionResponse. returning CONTINUE_TRANSACTION."); ResponseCode.CONTINUE_TRANSACTION.writeResponse(new DataOutputStream(bos)); break; case TRANSACTION_CONFIRMED: logger.debug("readTransactionResponse. responseCode={}", responseCode); if(responseCode.containsMessage()){ responseCode.writeResponse(new DataOutputStream(bos), ""); } else { responseCode.writeResponse(new DataOutputStream(bos));
ResponseCode handshakeResult = e.getResponseCode(); if(handshakeResult.containsMessage()){ handshakeResult.writeResponse(dos, e.getMessage()); } else { handshakeResult.writeResponse(dos); ResponseCode.PROPERTIES_OK.writeResponse(dos);