Code example for Predicate

Methods: apply

0
      Task task = client.resetVApp(URI.create(checkNotNull(in, "node.id")));
      return returnWhenTaskCompletes(in, task);
   } 
 
   private NodeMetadata returnWhenTaskCompletes(String in, Task task) {
      taskTester.apply(task.getHref());
      return getNode.getNode(in);
   } 
 
   @Override 
   public NodeMetadata resumeNode(String in) {
      Task task = client.powerOnVApp(URI.create(checkNotNull(in, "node.id")));
      return returnWhenTaskCompletes(in, task);
   } 
 
   @Override 
   public NodeMetadata suspendNode(String in) {
      Task task = client.powerOffVApp(URI.create(checkNotNull(in, "node.id")));
      return returnWhenTaskCompletes(in, task);
   }