Class TestCommand<C extends io.dropwizard.Configuration>

  • Type Parameters:
    C - configuration type

    public class TestCommand<C extends io.dropwizard.Configuration>
    extends io.dropwizard.cli.EnvironmentCommand<C>
    Lightweight variation of server command for testing purposes. Handles managed objects lifecycle.
    Since:
    23.10.2014
    • Constructor Summary

      Constructors 
      Constructor Description
      TestCommand​(io.dropwizard.Application<C> application)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Class<C> getConfigurationClass()  
      protected void run​(io.dropwizard.setup.Environment environment, net.sourceforge.argparse4j.inf.Namespace namespace, C configuration)  
      void stop()  
      • Methods inherited from class io.dropwizard.cli.EnvironmentCommand

        getEnvironment, run
      • Methods inherited from class io.dropwizard.cli.ConfiguredCommand

        addFileArgument, cleanup, cleanupAsynchronously, configure, getConfiguration, run
      • Methods inherited from class io.dropwizard.cli.Command

        getDescription, getName, onError
      • Methods inherited from class java.lang.Object

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

      • TestCommand

        public TestCommand​(io.dropwizard.Application<C> application)
    • Method Detail

      • run

        protected void run​(io.dropwizard.setup.Environment environment,
                           net.sourceforge.argparse4j.inf.Namespace namespace,
                           C configuration)
                    throws java.lang.Exception
        Specified by:
        run in class io.dropwizard.cli.EnvironmentCommand<C extends io.dropwizard.Configuration>
        Throws:
        java.lang.Exception
      • stop

        public void stop()
      • getConfigurationClass

        protected java.lang.Class<C> getConfigurationClass()
        Overrides:
        getConfigurationClass in class io.dropwizard.cli.ConfiguredCommand<C extends io.dropwizard.Configuration>