Beispiel #1
0
 /**
  * @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;
 }
Beispiel #2
0
 /**
  * @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.");
 }
Beispiel #3
0
 /**
  * @param node
  * @throws DeploymentException
  * @throws IOException
  */
 @Override
 protected void consumerConnect(XmlNode node) throws DeploymentException, IOException {
   connect(node.getSon("uri").getValue() + token);
 }
Beispiel #4
0
 /**
  * @param node
  * @throws InterruptedException
  */
 @Override
 protected void sleep(XmlNode node) throws InterruptedException {
   Thread.sleep(node.getValueAsInt());
 }
Beispiel #5
0
 /**
  * @param node
  * @throws DeploymentException
  * @throws IOException
  */
 @Override
 protected void agentConnect(XmlNode node) throws DeploymentException, IOException {
   connect(node.getSon("uri").getValue() + node.getSon("brand").getValue());
 }