Package org.iosgi.outpost

Examples of org.iosgi.outpost.Client.connect()


    while (true) {
      for (InetAddress addr : addresses) {
        Client oc = new Client(addr.getHostAddress(), this.getClass()
            .getClassLoader());
        try {
          oc.connect(1, TimeUnit.SECONDS);
        } catch (ConnectException ce) {
          LOGGER.debug("connection attempt failed", ce);
        }
        return oc;
      }
View Full Code Here


  }

  @Test
  public void test() throws Exception {
    Client c = new Client("localhost");
    c.connect(5, TimeUnit.SECONDS);
    File dir = new File(new File("."), "test");
    Assert.assertFalse(dir.exists());
    MkDir mkdir = new MkDir(dir);
    c.perform(mkdir);
    Assert.assertTrue(dir.exists());
View Full Code Here

  }

  @Test
  public void test() throws Exception {
    Client c = new Client("localhost");
    c.connect(5, TimeUnit.SECONDS);
    File target = new File(new File("."), "test");
    Assert.assertFalse(target.exists());
    byte[] data = new byte[RANDOM.nextInt(1024 * 1024) + 1];
    RANDOM.nextBytes(data);
    Put put = new Put(target, data);
View Full Code Here

  }

  @Test
  public void test() throws Exception {
    Client c = new Client("localhost");
    c.connect(5, TimeUnit.SECONDS);
    File dir = new File(new File("."), "subdir");
    MkDir mkdir = new MkDir(dir);
    c.perform(mkdir);
    Assert.assertTrue(dir.exists());
    File target = new File(dir, "test");
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.