package org.apache.storm.flux.spouts;

import backtype.storm.spout.ShellSpout;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;

import java.util.Map;

public class GenericShellSpout extends ShellSpout implements IRichSpout {

    public GenericShellSpout(String[] args){
        System.out.println("Creating GenericShellSpout with args: " + args);
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {

    }

    @Override
    public Map<String, Object> getComponentConfiguration() {
        return null;
    }
}

@@ -167,16 +167,52 @@
 eclarer;
+%0Aimport backtype.storm.tuple.Fields;
 %0A%0Aimport
@@ -301,16 +301,51 @@
 hSpout %7B
+%0A    private String%5B%5D outputFields;
 %0A%0A    pu
@@ -384,87 +384,97 @@
 args
-)%7B%0A        System.out.println(%22Creating GenericShellSpout with args: %22 + args);
+, String%5B%5D outputFields)%7B%0A        super(args);%0A        this.outputFields = outputFields;%0A
 %0A   
@@ -552,32 +552,76 @@
 rer 
-outputFieldsDeclarer) %7B%0A
+declarer) %7B%0A        declarer.declare(new Fields(this.outputFields));
 %0A   

allow output field definition