// Path: src/main/java/org/graylog/collector/inputs/InputService.java
// public abstract class InputService extends AbstractService implements Input {
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/Output.java
// public interface Output {
//     String getId();
// 
//     Set<String> getInputs();
// 
//     void write(Message message);
// 
//     interface Factory<T extends Output, C extends Configuration> {
//         T create(C configuration);
//     }
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/OutputConfiguration.java
// public abstract class OutputConfiguration implements Configuration {
//     public interface Factory<C extends OutputConfiguration> {
//         C create(String id, Config config);
//     }
// 
//     @NotBlank
//     private final String id;
// 
//     @NotNull
//     private Set<String> inputs = Sets.newHashSet();
// 
//     public OutputConfiguration(String id, Config config) {
//         this.id = id;
// 
//         if (config.hasPath("inputs")) {
//             this.inputs = Sets.newHashSet(Splitter.on(",").omitEmptyStrings().trimResults().split(config.getString("inputs")));
//         }
//     }
// 
//     public abstract OutputService createOutput();
// 
//     @Override
//     public String getId() {
//         return id;
//     }
// 
//     public Set<String> getInputs() {
//         return inputs;
//     }
// 
//     @Override
//     public Map<String, String> toStringValues() {
//         return Collections.unmodifiableMap(new HashMap<String, String>() {
//             {
//                 put("id", getId());
//                 put("inputs", Joiner.on(",").join(getInputs()));
//             }
//         });
//     }
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/OutputService.java
// public abstract class OutputService extends AbstractService implements Output {
// }


import javax.inject.Inject;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.Service;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigException;
import com.typesafe.config.ConfigObject;
import com.typesafe.config.ConfigValue;
import org.graylog.collector.inputs.Input;
import org.graylog.collector.inputs.InputConfiguration;
import org.graylog.collector.inputs.InputService;
import org.graylog.collector.outputs.Output;
import org.graylog.collector.outputs.OutputConfiguration;
import org.graylog.collector.outputs.OutputService;
    }

    private void buildInputs(final Config inputConfigs) {
        final Map<String, InputConfiguration.Factory<? extends InputConfiguration>> factories = ConfigurationRegistry.this.inputConfigFactories;

        dispatchConfig(inputConfigs, (type, id, config) -> {
            if (factories.containsKey(type)) {
                final InputConfiguration cfg = factories.get(type).create(id, config);

                if (validator.isValid(cfg)) {
                    final InputService input = cfg.createInput();
                    services.add(input);
                    inputs.add(input);
                }
            } else {
                errors.add(new ConfigurationError("Unknown input type \"" + type + "\" for " + id));
            }
        });
    }

    private void buildOutputs(Config outputConfigs) {
        final Map<String, OutputConfiguration.Factory<? extends OutputConfiguration>> factories = ConfigurationRegistry.this.outputConfigFactories;

        dispatchConfig(outputConfigs, new ConfigCallback() {
            @Override
            public void call(String type, String id, Config config) {
                if (factories.containsKey(type)) {
                    final OutputConfiguration cfg = factories.get(type).create(id, config);

                    if (validator.isValid(cfg)) {
// Path: src/main/java/org/graylog/collector/inputs/InputService.java
// public abstract class InputService extends AbstractService implements Input {
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/Output.java
// public interface Output {
//     String getId();
// 
//     Set<String> getInputs();
// 
//     void write(Message message);
// 
//     interface Factory<T extends Output, C extends Configuration> {
//         T create(C configuration);
//     }
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/OutputConfiguration.java
// public abstract class OutputConfiguration implements Configuration {
//     public interface Factory<C extends OutputConfiguration> {
//         C create(String id, Config config);
//     }
// 
//     @NotBlank
//     private final String id;
// 
//     @NotNull
//     private Set<String> inputs = Sets.newHashSet();
// 
//     public OutputConfiguration(String id, Config config) {
//         this.id = id;
// 
//         if (config.hasPath("inputs")) {
//             this.inputs = Sets.newHashSet(Splitter.on(",").omitEmptyStrings().trimResults().split(config.getString("inputs")));
//         }
//     }
// 
//     public abstract OutputService createOutput();
// 
//     @Override
//     public String getId() {
//         return id;
//     }
// 
//     public Set<String> getInputs() {
//         return inputs;
//     }
// 
//     @Override
//     public Map<String, String> toStringValues() {
//         return Collections.unmodifiableMap(new HashMap<String, String>() {
//             {
//                 put("id", getId());
//                 put("inputs", Joiner.on(",").join(getInputs()));
//             }
//         });
//     }
// }
// 
// Path: src/main/java/org/graylog/collector/outputs/OutputService.java
// public abstract class OutputService extends AbstractService implements Output {
// }


// Path: src/main/java/org/graylog/collector/config/ConfigurationRegistry.java
import javax.inject.Inject;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.Service;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigException;
import com.typesafe.config.ConfigObject;
import com.typesafe.config.ConfigValue;
import org.graylog.collector.inputs.Input;
import org.graylog.collector.inputs.InputConfiguration;
import org.graylog.collector.inputs.InputService;
import org.graylog.collector.outputs.Output;
import org.graylog.collector.outputs.OutputConfiguration;
import org.graylog.collector.outputs.OutputService;

    }

    private void buildInputs(final Config inputConfigs) {
        final Map<String, InputConfiguration.Factory<? extends InputConfiguration>> factories = ConfigurationRegistry.this.inputConfigFactories;

        dispatchConfig(inputConfigs, (type, id, config) -> {
            if (factories.containsKey(type)) {
                final InputConfiguration cfg = factories.get(type).create(id, config);

                if (validator.isValid(cfg)) {
                    final InputService input = cfg.createInput();
                    services.add(input);
                    inputs.add(input);
                }
            } else {
                errors.add(new ConfigurationError("Unknown input type \"" + type + "\" for " + id));
            }
        });
    }

    private void buildOutputs(Config outputConfigs) {
        final Map<String, OutputConfiguration.Factory<? extends OutputConfiguration>> factories = ConfigurationRegistry.this.outputConfigFactories;

        dispatchConfig(outputConfigs, new ConfigCallback() {
            @Override
            public void call(String type, String id, Config config) {
                if (factories.containsKey(type)) {
                    final OutputConfiguration cfg = factories.get(type).create(id, config);

                    if (validator.isValid(cfg)) {
                        final OutputService output = cfg.createOutput();