Package io.dropwizard.setup

Examples of io.dropwizard.setup.Environment.admin()


    @Test
    public void testBuild() throws Exception {
        final Environment environment = new Environment("testEnvironment", objectMapper, validator, new MetricRegistry(),
                ClassLoader.getSystemClassLoader());
        environment.jersey().register(new TestResource());
        environment.admin().addTask(new TestTask());

        final Server server = http.build(environment);
        server.start();

        final int port = ((AbstractNetworkConnector) server.getConnectors()[0]).getLocalPort();
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.