All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yammer.breakerbox.dashboard.bundle.BreakerboxDashboardBundle Maven / Gradle / Ivy

There is a newer version: 0.6.5
Show newest version
package com.yammer.breakerbox.dashboard.bundle;

import com.netflix.hystrix.dashboard.stream.MockStreamServlet;
import com.netflix.hystrix.dashboard.stream.ProxyStreamServlet;
import io.dropwizard.Configuration;
import io.dropwizard.ConfiguredBundle;
import io.dropwizard.assets.AssetsBundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

public class BreakerboxDashboardBundle implements ConfiguredBundle {
    @Override
    public void initialize(Bootstrap bootstrap) {
        bootstrap.addBundle(new AssetsBundle());
    }

    @Override
    public void run(Configuration configuration, Environment environment) throws Exception {
        //TODO: NEED TO DISABLE GZIP for text/event-stream

        environment.servlets().addServlet("mock.stream", new MockStreamServlet()).addMapping("/tenacity/mock.stream");
        environment.servlets().addServlet("proxy.stream", new ProxyStreamServlet()).addMapping("/tenacity/proxy.stream");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy