Code example for Predicate

Methods: apply

0
         System.out.println(output);
         output = ssh.exec(script + " status");
 
         assert !output.getOutput().trim().equals("") : output;
         Predicate<String> scriptTester = retry(new ScriptTester(ssh, SCRIPT_END), 600, 10, SECONDS);
         scriptTester.apply(script);
      } finally { 
         if (ssh != null)
            ssh.disconnect();
      } 
   } 
 
   public static class ScriptTester implements Predicate<String> {
      private final SshClient ssh;
      private final String endMatches;
 
      public ScriptTester(SshClient ssh, String endMatches) {
         this.ssh = ssh;
         this.endMatches = endMatches;
      }