/** * @param node * @return * @throws JsonParseException * @throws JsonMappingException * @throws JsonGenerationException * @throws IOException */ private List<JsonNode> convertToJson(XmlNode node) throws JsonParseException, JsonMappingException, JsonGenerationException, IOException { List<JsonNode> messageList = new ArrayList<JsonNode>(node.getSonsExceptDefault().size()); for (XmlNode son : node.getSonsExceptDefault()) { messageList.add(mapper.readValue(writer.writeValueAsString(son), JsonNode.class)); } return messageList; }
/** * @param node * @throws IncorrectCommandException */ @Override protected void notImplementedYet(XmlNode node) throws IncorrectCommandException { throw new IncorrectCommandException( "Scenario:" + getListenerName() + "\nRobot:" + getName() + "\nThe command" + node.getName() + " not implemented yet."); }
/** * @param node * @throws DeploymentException * @throws IOException */ @Override protected void consumerConnect(XmlNode node) throws DeploymentException, IOException { connect(node.getSon("uri").getValue() + token); }
/** * @param node * @throws InterruptedException */ @Override protected void sleep(XmlNode node) throws InterruptedException { Thread.sleep(node.getValueAsInt()); }
/** * @param node * @throws DeploymentException * @throws IOException */ @Override protected void agentConnect(XmlNode node) throws DeploymentException, IOException { connect(node.getSon("uri").getValue() + node.getSon("brand").getValue()); }