@Test public void depositToSDWShouldCallMessageProducer() throws Asn1CommandManagerException { testAsn1CommandManager.depositToSdw("message"); }
public void depositToSdw(String asdBytes) throws Asn1CommandManagerException { if (this.odeProperties.shouldDepositSdwMessagesOverWebsocket()) { try { depositor.deposit(asdBytes); String websocketDepositMessage = "Deposited message to SDW directly via websocket {}"; logger.info(websocketDepositMessage, asdBytes); EventLogger.logger.info(websocketDepositMessage, asdBytes); } catch (DdsRequestManagerException e) { String msg = "Failed to deposit message to SDW"; throw new Asn1CommandManagerException(msg, e); } } else { stringMessageProducer.send(this.getDepositTopic(), null, asdBytes); String sdwKafkaDepositMessage = "Published message to SDW deposit Kafka topic {}"; logger.info(sdwKafkaDepositMessage, asdBytes); EventLogger.logger.info(sdwKafkaDepositMessage, asdBytes); } }
Asn1CommandManager { public void depositToSdw(String asdBytes) throws Asn1CommandManagerException { if (this.odeProperties.shouldDepositSdwMessagesOverWebsocket()) { try { depositor.deposit(asdBytes); String websocketDepositMessage = "Deposited message to SDW directly via websocket {}"; logger.info(websocketDepositMessage, asdBytes); EventLogger.logger.info(websocketDepositMessage, asdBytes); } catch (DdsRequestManagerException e) { String msg = "Failed to deposit message to SDW"; throw new Asn1CommandManagerException(msg, e); } } else { stringMessageProducer.send(this.getDepositTopic(), null, asdBytes); String sdwKafkaDepositMessage = "Published message to SDW deposit Kafka topic {}"; logger.info(sdwKafkaDepositMessage, asdBytes); EventLogger.logger.info(sdwKafkaDepositMessage, asdBytes); } } }
Asn1CommandManager { public void depositToSdw(String asdBytes) throws Asn1CommandManagerException { if (this.odeProperties.shouldDepositSdwMessagesOverWebsocket()) { try { depositor.deposit(asdBytes); String websocketDepositMessage = "Deposited message to SDW directly via websocket {}"; logger.info(websocketDepositMessage, asdBytes); EventLogger.logger.info(websocketDepositMessage, asdBytes); } catch (DdsRequestManagerException e) { String msg = "Failed to deposit message to SDW"; throw new Asn1CommandManagerException(msg, e); } } else { stringMessageProducer.send(this.getDepositTopic(), null, asdBytes); String sdwKafkaDepositMessage = "Published message to SDW deposit Kafka topic {}"; logger.info(sdwKafkaDepositMessage, asdBytes); EventLogger.logger.info(sdwKafkaDepositMessage, asdBytes); } } Asn1CommandManager(OdeProperties odeProperties); }
Asn1CommandManager { public void depositToSdw(String asdBytes) throws Asn1CommandManagerException { if (this.odeProperties.shouldDepositSdwMessagesOverWebsocket()) { try { depositor.deposit(asdBytes); String websocketDepositMessage = "Deposited message to SDW directly via websocket {}"; logger.info(websocketDepositMessage, asdBytes); EventLogger.logger.info(websocketDepositMessage, asdBytes); } catch (DdsRequestManagerException e) { String msg = "Failed to deposit message to SDW"; throw new Asn1CommandManagerException(msg, e); } } else { stringMessageProducer.send(this.getDepositTopic(), null, asdBytes); String sdwKafkaDepositMessage = "Published message to SDW deposit Kafka topic {}"; logger.info(sdwKafkaDepositMessage, asdBytes); EventLogger.logger.info(sdwKafkaDepositMessage, asdBytes); } } Asn1CommandManager(OdeProperties odeProperties); void depositToSdw(String asdBytes); Map<String, String> sendToRsus(ServiceRequest request, String encodedMsg); String sendForSignature(String message); String packageSignedTimIntoAsd(ServiceRequest request, String signedMsg); static ArrayNode buildEncodings(); String getDepositTopic(); void setDepositTopic(String depositTopic); }
Asn1CommandManager { public void depositToSdw(String asdBytes) throws Asn1CommandManagerException { if (this.odeProperties.shouldDepositSdwMessagesOverWebsocket()) { try { depositor.deposit(asdBytes); String websocketDepositMessage = "Deposited message to SDW directly via websocket {}"; logger.info(websocketDepositMessage, asdBytes); EventLogger.logger.info(websocketDepositMessage, asdBytes); } catch (DdsRequestManagerException e) { String msg = "Failed to deposit message to SDW"; throw new Asn1CommandManagerException(msg, e); } } else { stringMessageProducer.send(this.getDepositTopic(), null, asdBytes); String sdwKafkaDepositMessage = "Published message to SDW deposit Kafka topic {}"; logger.info(sdwKafkaDepositMessage, asdBytes); EventLogger.logger.info(sdwKafkaDepositMessage, asdBytes); } } Asn1CommandManager(OdeProperties odeProperties); void depositToSdw(String asdBytes); Map<String, String> sendToRsus(ServiceRequest request, String encodedMsg); String sendForSignature(String message); String packageSignedTimIntoAsd(ServiceRequest request, String signedMsg); static ArrayNode buildEncodings(); String getDepositTopic(); void setDepositTopic(String depositTopic); static final String ADVISORY_SITUATION_DATA_STRING; }