@edu.umd.cs.findbugs.annotations.SuppressWarnings
    public final void runApp() throws Exception {
        PackagesResourceConfig resourceConfig = new PackagesResourceConfig("com.netflix.ribbon.examples.server");
        ExecutorService service = Executors.newFixedThreadPool(50);
        try{
            server = HttpServerFactory.create(SERVICE_URI, resourceConfig);           
            server.setExecutor(service);
            server.start();
            run();
        } finally {
            System.err.println("Shut down server ...");
            if (server != null) {
                server.stop(1);
            }
            service.shutdownNow();
        }
        System.exit(0);
    }
A base class for some sample applications that starts and stops a local server

@author awang
ribbon-examples/src/main/java/com/netflix/ribbon/examples/ExampleAppWithLocalResource.java