component.getDefaultHost().attach(guard); guard.setNext(new EngineApplication(engine)); component.start(); startupOut.println("engine listening at port "+port); startupOut.println("operator login set per " +
_component.start(); } catch (final Exception e) { LOGGER.error("Caught exception while starting controller", e);
public static void main(String[] args) throws Exception { // Load the Spring container ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( "org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml"); // Start the Restlet component Component component = ctx.getBean("component", Component.class); component.start(); ctx.close(); }
public static void main(String[] args) throws Exception { // Create a new Component. Component component = new Component(); // Add a new HTTP server listening on port 8182. component.getServers().add(Protocol.HTTP, 8182); // Attach the sample application. component.getDefaultHost().attach("/firstSteps", new FirstStepsApplication()); // Start the component. component.start(); }
Component serverComponent = new Component(); serverComponent.getServers().add(Protocol.HTTP, 8080); final Router router = new Router(serverComponent.getContext().createChildContext()); router.attach("/myrestendpoint", MyServerResource.class); serverComponent.getDefaultHost().attach(router); serverComponent.start();
Component component = new Component(); component.getServers().add(Protocol.HTTP, 8182); // JAXRS application JaxRsApplication application = new JaxRsApplication(component.getContext()); application.add(new MyApplication()); // Attachment component.getDefaultHost().attachDefault(application); // Start component.start();
public static void main(String[] args) throws Exception { Component component = new Component(); component.getDefaultHost().attachDefault(CachingServerResource.class); component.getServers().add(Protocol.HTTP, 8111); component.start(); }
public static void main(String[] args) throws Exception { // Create a new Component. Component component = new Component(); // Add a new HTTP server listening on port 8111. component.getServers().add(Protocol.HTTP, 8111); component.getDefaultHost().attach("/firstResource", new FirstResourceApplication()); // Start the component. component.start(); }
public static void main(String[] args) throws Exception { Component c = new Component(); c.getServers().add(Protocol.HTTP, 8182); c.getDefaultHost().attach(new QueryRouterApplication()); c.start(); }
public static void main(String[] args) throws Exception { // Create a new Component. Component component = new Component(); // Add a new HTTP server listening on port 8111. component.getServers().add(Protocol.HTTP, 8111); component.getDefaultHost().attach("/firstResource", new FirstResourceApplication()); // Start the component. component.start(); }
public static void main(String[] args) throws Exception { Component c = new Component(); c.getServers().add(Protocol.HTTP, 8182); c.getDefaultHost().attach(new FileUploadApplication()); c.start(); }
public static void main(String[] args) throws Exception { // Create a component Component component = new Component(); component.getServers().add(Protocol.HTTP, 8111); // Create an application Application application = new SearchRedirector(); // Attach the application to the component and start it component.getDefaultHost().attachDefault(application); component.start(); }
public void start() throws Exception { Injector injector = RestletGuice.createInjector(modules); Application instance = injector.getInstance(application); Component component = new Component(); component.getServers().add(Protocol.HTTP, port); component.getClients().add(Protocol.FILE); component.getClients().add(Protocol.CLAP); component.getDefaultHost().attach(instance); component.start(); }
public static void main(String[] args) throws Exception { Component server = new Component() ; server.getServers().add(Protocol.HTTP, 8080) ; server.getDefaultHost().attach(new CartServer()) ; server.start() ; CartAPI.generateOrders() ; }
public static void main(String[] args) throws Exception { Component c = new Component(); // server listening on pport 8182 c.getServers().add(Protocol.HTTP, 8182); // client connector required by the Directory. c.getClients().add(Protocol.FILE); c.getDefaultHost().attach(new AuthenticationApplication()); c.start(); }
public static void main(String[] args) throws Exception { Component component = new Component(); component.getServers().add(Protocol.HTTP, 8111); component.getClients().add(Protocol.FILE); component.getDefaultHost().attach(new MergeSitesServicesApplication()); component.start(); }
public static void main(String[] args) throws Exception { Component c = new Component(); // server listening on pport 8182 c.getServers().add(Protocol.HTTP, 8182); // client connector required by the Directory. c.getClients().add(Protocol.FILE); c.getDefaultHost().attach(new HttpDigestAuthenticationApplication()); c.start(); }
public static void main(String[] args) throws Exception { // Setup Restlet Component component = new Component(); component.getClients().add(Protocol.HTTP); component.getClients().add(Protocol.HTTPS); component.getServers().add(Protocol.HTTP, 8888); component.getDefaultHost().attach("/sample", new SampleApplication()); component.start(); } }
@Override public void startServer() throws Exception { configuration.refresh(); component = new Component(); component.getServers().add( Protocol.HTTP, configuration.get().port().get() ); RestApplication application = module.newObject( RestApplication.class, component.getContext() ); component.getDefaultHost().attach( application ); component.start(); }
public static void main(String... args) throws Exception { // Create a component with an HTTP server connector final Component component = new Component(); component.getServers().add(Protocol.HTTP, 8585); component.getClients().add(Protocol.FILE); component.getClients().add(Protocol.CLAP); component.getClients().add(Protocol.HTTP); // Attach the application to the default host and start it component.getDefaultHost().attach("/foaf", new Application()); component.start(); }