Class MetricsWebsocketBroadcastHandler

  • All Implemented Interfaces:

    public class MetricsWebsocketBroadcastHandler
    extends Object
    implements Handler
    A Handler that broadcasts metric reports via web sockets.

    This handler should be bound to an application path, and most likely only for the GET method…

     import ratpack.dropwizard.metrics.MetricsWebsocketBroadcastHandler;
     import static org.junit.jupiter.api.Assertions.*;
     assertTrue(chain instanceof ratpack.core.handling.Chain);
     chain.get("admin/metrics", new MetricsWebsocketBroadcastHandler());
    • Constructor Detail

      • MetricsWebsocketBroadcastHandler

        public MetricsWebsocketBroadcastHandler()
    • Method Detail

      • handle

        public void handle​(Context context)
                    throws Exception
        Description copied from interface: Handler
        Handles the context.
        Specified by:
        handle in interface Handler
        context - The context to handle
        Exception - if anything goes wrong (exception will be implicitly passed to the context's Context.error(Throwable) method)