Examples of Runtime


Examples of org.apache.jmeter.control.RunTime

        }
    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement() {
        RunTime lc = new RunTime();
        modifyTestElement(lc);
        return lc;
    }
View Full Code Here

Examples of org.apache.jmeter.control.RunTime

        }
    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement() {
        RunTime lc = new RunTime();
        modifyTestElement(lc);
        return lc;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.topology.Runtime

        documentProcessor = null;
    }

    public void testReadTopology() throws Exception {
        URL url = getClass().getResource("runtime.topology");
        Runtime runtime = (Runtime)documentProcessor.read(null, null, url);
        assertNotNull(runtime);
       
        Node node0 = runtime.getNodes().get(0);
        Scheme scheme0 = node0.getSchemes("nodomain").get(0);
        assertEquals(scheme0.getName(), "http");
       
        Node node1 = runtime.getNodes().get(1);
        Component component0 = node1.getComponents("domainA").get(0);
        assertEquals(component0.getName(), "AddServiceComponent");
    }
View Full Code Here

Examples of org.apache.tuscany.sca.topology.Runtime

        InputStream urlStream = null;
        try {
            urlStream = url.openStream();
            XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
            reader.nextTag();
            Runtime node = (Runtime)extensionProcessor.read(reader);
            return node;
           
        } catch (XMLStreamException e) {
            throw new ContributionReadException(e);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.tuscany.sca.topology.Runtime

        super(topologyFactory, assemblyFactory, extensionProcessor);
    }
   
    public Runtime read(XMLStreamReader reader) throws ContributionReadException {
        QName name = null;
        Runtime runtime = null;
        Node node = null;
        String domainName = DEFAULT_DOMAIN;
     
        try {
           
            // Read the composite document
            while (reader.hasNext()) {
                int event = reader.getEventType();
                switch (event) {
                    case START_ELEMENT:
                        name = reader.getName();
                       
                        if (RUNTIME_QNAME.equals(name)) {
                            // Read a <runtime>
                            runtime = topologyFactory.createRuntime();
                        } else if (NODE_QNAME.equals(name)) {
                            // Read a <node>
                            node = topologyFactory.createNode();
                            node.setName(getString(reader, NAME));
                           
                            // add node to runtime
                            runtime.getNodes().add(node);
                           
                            // reset domain name to the default
                            domainName = DEFAULT_DOMAIN;
                        } else if (DOMAIN_QNAME.equals(name)) {
                            // Read a <domain>
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime

            Assert.fail("No handler registered. Should throw a MalformedURLException.");
        } catch (MalformedURLException mue) {
            // expected
        }

        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        ModuleContext syscontext = runtime.getModuleContext();

        Dictionary<String, Object> props = new Hashtable<>();
        props.put(Constants.URL_HANDLER_PROTOCOL, "foo");
        ServiceRegistration<URLStreamHandler> sreg = syscontext.registerService(URLStreamHandler.class, new MyHandler(), props);
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime

    }

    @Test
    public void testServletThroughSystemContext() throws Exception {

        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        Module module = runtime.getModule(getClass().getClassLoader());

        HttpService httpService = ServiceLocator.getRequiredService(HttpService.class);
        String reqspec = "/gravia/servlet?test=module";

        // Verify that the alias is not yet available
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime

    }

    @Test
    public void testServletThroughModuleContext() throws Exception {

        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        Module module = runtime.getModule(getClass().getClassLoader());

        ModuleContext context = module.getModuleContext();
        ServiceReference<HttpService> sref = context.getServiceReference(HttpService.class);
        HttpService httpService = context.getService(sref);
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime

        }

        // Install the resource as module
        ModuleLoader moduleLoader = org.jboss.modules.Module.getBootModuleLoader();
        ModuleClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader();
        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        Module module = runtime.installModule(classLoader, resource, null);

        // Start the module
        module.start();

        Resource modres = module.adapt(Resource.class);
View Full Code Here

Examples of org.jboss.gravia.runtime.Runtime

        } finally {
            NamedResourceAssociation.removeResource(runtimeName);
        }

        // Install the resource as module if it has not happend already
        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        Module module = runtime.getModule(resource.getIdentity());
        if (module == null) {
            ModuleLoader moduleLoader = injectedServiceModuleLoader.getValue();
            ModuleIdentifier modid = ModuleIdentifier.create(ServiceModuleLoader.MODULE_PREFIX + runtimeName);
            ClassLoader classLoader = moduleLoader.loadModule(modid).getClassLoader();
            module = runtime.installModule(classLoader, resource, null);
        }

        Resource modres = module != null ? module.adapt(Resource.class) : resource;
        return new AbstractResourceHandle(modres, module) {
            @Override
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.