Package org.restlet

Examples of org.restlet.Component.start()


            }
        };

        // Attach the application to the component and start it
        component.getDefaultHost().attach(application);
        component.start();
    }

}
View Full Code Here


        // Attach the private application
        component.getInternalRouter().attach("/app", app);

        try {
            component.start();

            ClientResource res = new ClientResource(
                    "riap://component/app/testA");
            Representation rep = res.get();
            assertEquals("hello, world", rep.getText());
View Full Code Here

            component.getDefaultHost().attach("/freemarker",
                    freemarkerApplication);
            component.getDefaultHost().attach("/velocity", velocityApplication);

            // Now, let's start the component!
            component.start();

            // Allow extensions tunneling
            freemarkerApplication.getTunnelService().setExtensionsTunnel(true);
            velocityApplication.getTunnelService().setExtensionsTunnel(true);
            Client client = new Client(Protocol.HTTP);
View Full Code Here

        final MyApplication application = new MyApplication(this.testDir);
        // Attach the application to the component and start it
        clientComponent.getDefaultHost().attach("", application);

        // Now, let's start the component!
        clientComponent.start();

        // Allow extensions tunneling
        application.getTunnelService().setExtensionsTunnel(true);
        BioUtils.delete(this.testDir, true);
        this.testDir = new File(System.getProperty("java.io.tmpdir"),
View Full Code Here

        component.getDefaultHost().attach("/firstResource",
                new FirstResourceApplication());

        // Start the component.
        component.start();
    }

}
View Full Code Here

        final Component comp = new Component();
        comp.getServers().add(Protocol.HTTP, 3000);

        // Attach the application to the default host and start it
        comp.getDefaultHost().attach("/v1", new Application());
        comp.start();
    }

    private final ObjectContainer container;

    /**
 
View Full Code Here

        // Create an application
        Application application = new Part09a();

        // Attach the application to the component and start it
        component.getDefaultHost().attachDefault(application);
        component.start();
    }

    @Override
    public Restlet createInboundRoot() {
        // Create a simple password verifier
View Full Code Here

        config.append("</host>");

        config.append("</component>");

        final Component component = new Component(config);
        component.start();

        final Client client = new Client(Protocol.HTTP);

        Response response = client.handle(new Request(Method.GET,
                "http://localhost:" + this.port + "/efgh"));
View Full Code Here

                "org/restlet/test/ext/spring/SpringTestCase.xml");
        BeanFactory factory = new XmlBeanFactory(resource);

        // Start the Restlet component
        Component component = (Component) factory.getBean("component");
        component.start();
        Thread.sleep(500);
        component.stop();
    }

    public void testSpringServerProperties() {
View Full Code Here

        final Component comp = new Component();
        comp.getServers().add(protocol, 0);

        // Attach the application to the component and start it
        comp.getDefaultHost().attach(application);
        comp.start();
        this.component = comp;
        System.out.println("listening on port " + getServerPort());
    }

    /**
 
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.