Package org.jclouds.predicates

Examples of org.jclouds.predicates.SocketOpen


      computeContext = builder.buildView(ComputeServiceContext.class);
   }

   protected void buildSocketTester() {
      SocketOpen socketOpen = Guice.createInjector(getSshModule()).getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
   }
View Full Code Here


   public void setupContext() {
      super.setupContext();

      client = view.utils().injector().getInstance(CloudSigmaClient.class);
      driveNotClaimed = retry(Predicates.not(new DriveClaimed(client)), maxDriveImageTime, 1, SECONDS);
      SocketOpen socketOpten = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpten, maxDriveImageTime, 1, SECONDS);

      if (template == null || template.getImageId() == null) {
         imageId = view.getComputeService().templateBuilder().build().getImage().getId();
      }
View Full Code Here

      Injector injector = view.utils().injector();
      client = injector.getInstance(EC2Client.class);
      sshFactory = injector.getInstance(SshClient.Factory.class);
      runningTester = retry(new InstanceStateRunning(client), 180, 5,SECONDS);
      hasIpTester = retry(new InstanceHasIpAddress(client), 180, 5, SECONDS);
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, SECONDS);
   }
View Full Code Here

   public void setupContext() {
      super.setupContext();
      Injector injector = view.utils().injector();
      client = injector.getInstance(EC2Client.class);
      sshFactory = injector.getInstance(SshClient.Factory.class);
      SocketOpen socketOpen = injector.getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 120, 1, SECONDS);

      VolumeAvailable volumeAvailable = injector.getInstance(VolumeAvailable.class);
      volumeTester = retry(volumeAvailable, 60, 1, SECONDS);
View Full Code Here

      key = SshKeys.generate();
      fingerprint = SshKeys.fingerprintPublicKey(key.get("public"));
      cloudApiContext.getApi().getKeyApi().create(Key.builder().name(fingerprint).key(key.get("public")).build());
      api = cloudApiContext.getApi().getMachineApiForDatacenter(
            Iterables.get(cloudApiContext.getApi().getConfiguredDatacenters(), 0));
      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 180, 1, 1, SECONDS);
      machineRunning = retry(new Predicate<Machine>() {
         public boolean apply(Machine input) {
            return api.get(input.getId()).getState() == Machine.State.RUNNING;
         }
View Full Code Here

   @BeforeClass(groups = "live")
   @Override
   public void setup() {
      super.setup();
      securityGroup = createSecurityGroupAndAuthorizeIngressToAll(INSTANCE);
      SocketOpen socketOpen = Guice.createInjector(new AbstractModule(){
         @Override
         protected void configure() {
            bind(new TypeLiteral<Function<URI, Proxy>>() {
            }).to(ProxyForURI.class);
         }
View Full Code Here

      }
   }

   @Override
   protected void buildSocketTester() {
      SocketOpen socketOpen = Guice.createInjector(new AbstractModule(){
         @Override
         protected void configure() {
            bind(new TypeLiteral<Function<URI, Proxy>>() {
            }).to(ProxyForURI.class);
         }
View Full Code Here

   }

   @Test
   public void testReturnsReachable() throws Exception {
      SocketOpen secondSocketOpen = new SocketOpen() {
         @Override
         public boolean apply(HostAndPort input) {
            return HostAndPort.fromParts(PRIVATE_IP, 22).equals(input);
         }
      };
View Full Code Here

      super.setupContext();
      imageId = view.getComputeService().templateBuilder().build().getImage().getId();
        
      client = view.utils().injector().getInstance(ElasticStackApi.class);
      driveNotClaimed = retry(Predicates.not(new DriveClaimed(client)), maxDriveImageTime, 1, SECONDS);
      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, maxDriveImageTime, 1, SECONDS);
   }
View Full Code Here

      keyPair = ComputeTestUtils.setupKeyPair();
   }


   protected void buildSocketTester() {
      SocketOpen socketOpen = view.utils().injector().getInstance(SocketOpen.class);
      socketTester = retry(socketOpen, 60, 1, SECONDS);
      // wait a maximum of 60 seconds for port 8080 to open.
      openSocketFinder = context.utils().injector().getInstance(OpenSocketFinder.class);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.predicates.SocketOpen

Copyright © 2018 www.massapicom. 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.