Class BaseApplication<T extends io.dropwizard.Configuration>

java.lang.Object
io.dropwizard.Application<T>
io.github.devlibx.easy.app.dropwizard.BaseApplication<T>

public class BaseApplication<T extends io.dropwizard.Configuration> extends io.dropwizard.Application<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    Support proto buffer support.
    void
    initialize(io.dropwizard.setup.Bootstrap<T> bootstrap)
     
    protected void
    registerPrometheus(io.dropwizard.setup.Environment environment)
    Register prometheus.
    void
    run(T t, io.dropwizard.setup.Environment environment)
     

    Methods inherited from class io.dropwizard.Application

    addDefaultCommands, bootstrapLogging, bootstrapLogLevel, getConfigurationClass, getName, onFatalError, onFatalError, run

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseApplication

      public BaseApplication()
  • Method Details

    • initialize

      public void initialize(io.dropwizard.setup.Bootstrap<T> bootstrap)
      Overrides:
      initialize in class io.dropwizard.Application<T extends io.dropwizard.Configuration>
    • run

      public void run(T t, io.dropwizard.setup.Environment environment) throws Exception
      Specified by:
      run in class io.dropwizard.Application<T extends io.dropwizard.Configuration>
      Throws:
      Exception
    • registerPrometheus

      protected void registerPrometheus(io.dropwizard.setup.Environment environment)
      Register prometheus. It will register only if we have setup correct dependencies.

      NOTE - this method will not throw error, it will just log the error.

      Dependency - We should have registered PrometheusMetrics as IMetrics.class

    • enableProtobufSupport

      protected boolean enableProtobufSupport()
      Support proto buffer support. By default it is disabled.
      Returns:
      if true then this dropwizard app will also support proto-buffer.