Examples of waitFor()


Examples of org.apache.sshd.client.channel.ChannelExec.waitFor()

                channel.getInvertedIn().flush();
            }
        } catch (SshException e) {
            // That's ok, the channel is being closed by the other side
        }
        assertEquals(ChannelExec.CLOSED, channel.waitFor(ChannelExec.CLOSED, 0) & ChannelExec.CLOSED);
        session.close(false).await();
        client.stop();
    }

    @Test
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelSession.waitFor()

      if (timeout == null) {
        timeout = TimeSpan.ZERO;
      }

      // Wait for everything to finish
      int flags = sshChannel.waitFor(ClientChannel.EOF | ClientChannel.CLOSED, timeout.getTotalMilliseconds());
      if ((flags & ClientChannel.TIMEOUT) != 0) {
        closeAndRemoveFromPool();
        throw new SshException("Timeout while waiting for SSH task to complete.  Timeout was " + timeout);
      }
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelSession.waitFor()

      if ((flags & ClientChannel.TIMEOUT) != 0) {
        closeAndRemoveFromPool();
        throw new SshException("Timeout while waiting for SSH task to complete.  Timeout was " + timeout);
      }

      flags = sshChannel.waitFor(ClientChannel.EXIT_STATUS, 30000);
      if ((flags & ClientChannel.TIMEOUT) != 0) {
        closeAndRemoveFromPool();
        throw new SshException("Timeout while waiting for exit code.  Timeout was " + timeout);
      }
View Full Code Here

Examples of org.apache.sshd.client.channel.ChannelShell.waitFor()

                            }
                        }
                    }
                });

        channel.waitFor(ClientChannel.CLOSED, 0);

        assertEquals(nbMessages * message.length, baosOut.size());
    }

    @Test
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.StreamPumper.waitFor()

                    result = p.waitFor();

                    // Wait for the end of output and error streams
                    outPump.waitFor();
                    outLog.close();
                    errPump.waitFor();
                    errLog.close();
                } catch (InterruptedException ie) {
                    log("Thread interrupted: " + ie);
                }
View Full Code Here

Examples of org.atmosphere.annotation.Schedule.waitFor()

       
        Schedule scheduleAnnotation = ctx.getActionAnnotation(Schedule.class);
        if (scheduleAnnotation != null) {
           
            doSchedule(scheduleAnnotation.period(),
                    scheduleAnnotation.waitFor(),
                    entity, marshalledEntity, resource, req, resp,
                    scheduleAnnotation.resumeOnBroadcast());
        }
       
        /*
 
View Full Code Here

Examples of org.bladerunnerjs.utility.ProcessLogger.waitFor()

  public static void runCommand(BRJS brjs, ProcessBuilder processBuilder) throws CommandOperationException {
    try {
      Process process = processBuilder.start();
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.WARN, null);
      int exitCode = waitForProcess(process, brjs.logger(CommandRunnerUtility.class));
      processLogger.waitFor();
     
      if(exitCode != 0) throw new CommandOperationException("Error while running command '" +
          StringUtils.join(processBuilder.command(), " ") + "' (" + exitCode + ")");
    }
    catch(IOException | InterruptedException e) {
View Full Code Here

Examples of org.cometd.client.BayeuxClient.waitFor()

        BayeuxClient client1B = startClient(oort1, null);
        Assert.assertTrue(client1B.waitFor(5000, BayeuxClient.State.CONNECTED));
        BayeuxClient client1C = startClient(oort2, null);
        Assert.assertTrue(client1C.waitFor(5000, BayeuxClient.State.CONNECTED));
        BayeuxClient client3 = startClient(oort3, null);
        Assert.assertTrue(client3.waitFor(5000, BayeuxClient.State.CONNECTED));

        LatchListener publishLatch = new LatchListener();

        Map<String, Object> login1A = new HashMap<>();
        login1A.put("user", "user1");
View Full Code Here

Examples of org.jdesktop.wonderland.runner.StatusWaiter.waitFor()

            RunManager.getInstance().start(snapshot, false);

            // wait for the snapshot runner to exit, which it should do
            // as soon as it finishes starting up
            StatusWaiter waiter = new StatusWaiter(snapshot, Status.NOT_RUNNING);
            waiter.waitFor();
        } catch (InterruptedException ie) {
            // not much we can do here...
        } finally {
            synchronized(this) {
                snapshot = null;
View Full Code Here

Examples of org.jetbrains.jps.api.RequestFuture.waitFor()

            return;
          }

          final RequestFuture future = compileInExternalProcess(compileContext, false);
          if (future != null) {
            while (!future.waitFor(200L , TimeUnit.MILLISECONDS)) {
              if (indicator.isCanceled()) {
                future.cancel(false);
              }
            }
            if (!executeCompileTasks(compileContext, false)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.