Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.cli;
A command which executes with a configured com.yammer.dropwizard.config.Environment.

<T> the com.yammer.dropwizard.config.Configuration subclass which is loaded from the configuration file
See also:
public abstract class EnvironmentCommand<T extends Configurationextends ConfiguredCommand<T> {
    private final Service<T> service;

Creates a new environment command.

service the service providing this command
name the name of the command, used for command line invocation
description a description of the command's purpose
    protected EnvironmentCommand(Service<T> serviceString nameString description) {
        this. = service;
    protected final void run(Bootstrap<T> bootstrapNamespace namespace, T configurationthrows Exception {
        final Environment environment = new Environment(bootstrap.getName(),
                                                        new Validator());

Runs the command with the given com.yammer.dropwizard.config.Environment and com.yammer.dropwizard.config.Configuration.

environment the configured environment
namespace the parsed command line namespace
configuration the configuration object
java.lang.Exception if something goes wrong
    protected abstract void run(Environment environmentNamespace namespace, T configurationthrows Exception;
New to GrepCode? Check out our FAQ X