public StartReceiveVoiceCallStrategy( BusinessQueryManager businessQueryManager, CommunicationDto communicationDto, String prefix) throws MalformedURLException { super(prefix, businessQueryManager); this.communicationDto = communicationDto; communicationType = new CommunicationType(); communicationType.setSourcePhoneNumber(communicationDto.getSourcePhoneNumber()); communicationType.setDestinationPhoneNumber(communicationDto.getDestinationPhoneNumber()); communicationType.setVersion(nextVersion); }
@Override public void sendToReplicas() { for (String url : urlList) { AnacomPortType port = null; Logger.getLogger(this.getClass()) .info( "[ANACOM] Async startReceiveVoiceCall(" + communicationDto.getDestinationPhoneNumber() + ") New version : " + nextVersion); try { port = getPortType(url); } catch (Exception e) { System.out.println("[ERR] Nao foi possivel contactar a replica: " + url); } // Async Replica request if (port != null) { QuorumVersionResponse handlerResponse = new QuorumVersionResponse(url, this); addHandler(handlerResponse); port.startReceiveVoiceCallAsync(communicationType, handlerResponse); } } }