Package org.hyperic.sigar.win32

Examples of org.hyperic.sigar.win32.Service$Waiter


        //
        // addEndpoint(service, baseUrl + "/openstack/identity/v2.0");
        // }

        if (project != null) {
            Service service = new Service();
            services.add(service);

            service.id = service.name = "nova";
            service.type = ServiceType.COMPUTE.getType();

            addEndpoint(service, baseUrl + "/openstack/compute/" + project.getId());
        }

        if (project != null) {
            Service service = new Service();
            services.add(service);

            service.id = service.name = "trove";
            service.type = ServiceType.DBAAS.getType();

            addEndpoint(service, baseUrl + "/openstack/dbaas/" + project.getId());
        }

        // if (project != null) {
        // Service service = new Service();
        // services.add(service);
        //
        // service.id = service.name = "heat";
        // service.type = ServiceTypes.ORCHESTRATION;
        //
        // addEndpoint(service, baseUrl + "/openstack/orchestration/" +
        // project.getId());
        // }

        {
            Service service = new Service();
            services.add(service);

            service.name = "glance";
            service.type = ServiceType.IMAGE.getType();

            addEndpoint(service, baseUrl + "/openstack/images");
        }

        if (project != null) {
            Service service = new Service();
            services.add(service);

            service.name = "swift";
            service.type = ServiceType.OBJECT_STORE.getType();

            addEndpoint(service, baseUrl + "/openstack/storage/" + project.getId());
        }

        List<ServiceType> enabledServices = Lists.newArrayList();

        Project genericProject = new Project(project.getId());
        for (ExtensionModule extension : extensions.getExtensions()) {
            if (extension instanceof OpenstackExtension) {
                List<ServiceType> extensionServices = ((OpenstackExtension) extension).getServices(genericProject,
                        baseUrl);
                enabledServices.addAll(extensionServices);
            }
        }

        for (ServiceType serviceType : enabledServices) {
            Service service = new Service();
            services.add(service);

            service.name = serviceType.getName();
            service.id = service.name;
            service.type = serviceType.getType();
View Full Code Here


        // See if we end up with dead man walking
        SimpleTestThread<Waiter> t2 = new SimpleTestThread<Waiter>(waiterPool, "51");
        Thread thread2 = new Thread(t2);
        thread2.start()// Triggers clearOldest, killing all of the 0's and the 2 oldest 1's
        Thread.sleep(50); // Wait for clearOldest to kick off, but not long enough to reach the 1's
        Waiter waiter = waiterPool.borrowObject("1");
        Thread.sleep(200); // Wait for execution to happen
        waiterPool.returnObject("1", waiter)// Will throw IllegalStateException if dead
        waiterPool.close();
    }
View Full Code Here

        // See if we end up with dead man walking
        SimpleTestThread<Waiter> t2 = new SimpleTestThread<Waiter>(waiterPool, "51");
        Thread thread2 = new Thread(t2);
        thread2.start()// Triggers clearOldest, killing all of the 0's and the 2 oldest 1's
        Thread.sleep(50); // Wait for clearOldest to kick off, but not long enough to reach the 1's
        Waiter waiter = waiterPool.borrowObject("1");
        Thread.sleep(200); // Wait for execution to happen
        waiterPool.returnObject("1", waiter)// Will throw IllegalStateException if dead
        waiterPool.close();
    }
View Full Code Here

        // See if we end up with dead man walking
        SimpleTestThread<Waiter> t2 = new SimpleTestThread<Waiter>(waiterPool, "51");
        Thread thread2 = new Thread(t2);
        thread2.start()// Triggers clearOldest, killing all of the 0's and the 2 oldest 1's
        Thread.sleep(50); // Wait for clearOldest to kick off, but not long enough to reach the 1's
        Waiter waiter = waiterPool.borrowObject("1");
        Thread.sleep(200); // Wait for execution to happen
        waiterPool.returnObject("1", waiter)// Will throw IllegalStateException if dead
        waiterPool.close();
    }
View Full Code Here

        // See if we end up with dead man walking
        SimpleTestThread<Waiter> t2 = new SimpleTestThread<Waiter>(waiterPool, "51");
        Thread thread2 = new Thread(t2);
        thread2.start()// Triggers clearOldest, killing all of the 0's and the 2 oldest 1's
        Thread.sleep(50); // Wait for clearOldest to kick off, but not long enough to reach the 1's
        Waiter waiter = waiterPool.borrowObject("1");
        Thread.sleep(200); // Wait for execution to happen
        waiterPool.returnObject("1", waiter)// Will throw IllegalStateException if dead
        waiterPool.close();
    }
View Full Code Here

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                this.axisService = new AxisService();
                    AxisService retAxisService = populateService();
                    if (retAxisService != null) {
                        axisServices.add(retAxisService);
                    } // end if axisService was returned
View Full Code Here

    testAssertionService1060(services, errorReporter);
   
    int numServices = services.length;
    for(int i = 0; i < numServices; i++)
    {
      Service service = services[i];
     
      validateEndpoints(service.getEndpoints(), desc, errorReporter);
    }
  }
View Full Code Here

 
  Interface bindingInterface = binding.getInterface();
  WSDLComponent parent = endpoint.getParent();
  if(parent != null)
  {
    Service service = (Service)parent;
    Interface serviceInterface = service.getInterface();
   
    // If an interface hasn't been specified on the service this assertion doesn't apply.
    // If the binding interface is null this assertion passes.
    if(serviceInterface != null && bindingInterface != null && !serviceInterface.equals(bindingInterface))
    {
View Full Code Here

            System.out.println("Binding[" + j + "] : name = "
                    + bindings[j].getName());
        }

        Service services[] = descComp.getServices();
        System.out.println("There are " + services.length
                + " Service components.");

        for (int j = 0; j < services.length; j++) {
View Full Code Here

        List allServices = new Vector();
       
        //declared services
        for(Iterator i=fServiceElements.iterator(); i.hasNext(); )
        {
            Service service = (Service)i.next();
            if(!containsComponent(service, allServices)) {
                ((ServiceImpl)service).setDescriptionComponent(this);
                allServices.add(service);
            }
        }
       
        //nested services
        List nestedDescs = new Vector(getNestedDescriptions());
        for(Iterator i=nestedDescs.iterator(); i.hasNext(); )
        {
            DescriptionElement desc = (DescriptionElement)i.next();
            ServiceElement[] services = desc.getServiceElements();
            for(int j=0; j<services.length; j++)
            {
                Service service = (Service)services[j];
                if(!containsComponent(service, allServices)) {
                    ((ServiceImpl)service).setDescriptionComponent(this);
                    allServices.add(service);
                }
            }
View Full Code Here

TOP

Related Classes of org.hyperic.sigar.win32.Service$Waiter

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.