component.getClients().add(Protocol.FILE); component.getClients().add(Protocol.CLAP); Guard guard = new RateLimitGuard(null, ChallengeScheme.HTTP_DIGEST, "Authentication Required");
public void start() throws Exception { _component.getServers().add(Protocol.HTTP, Integer.parseInt(_config.getControllerPort())); _component.getClients().add(Protocol.FILE); _component.getClients().add(Protocol.JAR); _component.getClients().add(Protocol.WAR);
final Component component = new Component(); component.getClients().add(Protocol.CLAP); final Directory dir = new Directory(component.getContext(), "clap://class/META-INF/resources/webjars"); dir.setDeeplyAccessible(true); this.attach("/webjars", dir); //access via http://example.com/webjars/jquery/1.9.0/jquery.min.js
Component c = new Component(); Client client = c.getClients().add(Protocol.HTTP); client.getContext().getParameters().add ( "parameter", "value" );
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(); }
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 { // 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(); } }
/** Starts the Restlet. */ @Override public synchronized void start() throws Exception { for (final Client client : getComponent().getClients()) { getRoutes().add(new ClientRoute(this, client)); } super.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 { 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 { // Create a component Component component = new Component(); component.getServers().add(Protocol.HTTP, 8111); component.getClients().add(Protocol.FILE); // Create an application Application application = new Application() { @Override public Restlet createInboundRoot() { return new Directory(getContext(), ROOT_URI); } }; // Attach the application to the component and start it component.getDefaultHost().attach(application); component.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(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }
/** * Launches the application with an HTTP server. * * @param args * The arguments. * @throws Exception */ public static void main(String[] args) throws Exception { Component mailServer = new Component(); mailServer.getClients().add(Protocol.CLAP); mailServer.getServers().add(Protocol.HTTP, 8111); mailServer.getDefaultHost().attach(new MailServerApplication()); mailServer.start(); }