package orwell.proxy;

import orwell.proxy.config.ConfigCli;
import orwell.proxy.config.ConfigFactory;
import orwell.proxy.robot.RobotsMap;
import orwell.proxy.zmq.FrequencyFilter;
import orwell.proxy.zmq.IFilter;
import orwell.proxy.zmq.ZmqMessageFramework;

import java.util.ArrayList;

/**
 * Created by parapampa on 03/05/15.
 */
public class ProxyRobotsFactory {
    private final ConfigFactory configFactory;
    private final ZmqMessageFramework zmqMessageFramework;

    public ProxyRobotsFactory(final ConfigCli configPathType) {
        configFactory = new ConfigFactory(configPathType);

        zmqMessageFramework = new ZmqMessageFramework(configFactory.getConfigProxy().getSenderLinger(),
                configFactory.getConfigProxy().getReceiverLinger(),
                getFilterList());
    }

    public ProxyRobots getProxyRobots() {
        return new ProxyRobots(zmqMessageFramework,
                configFactory.getConfigServerGame(),
                configFactory.getConfigRobots(),
                new RobotsMap());
    }

    private ArrayList<IFilter> getFilterList(){
        final ArrayList<IFilter> filterList = new ArrayList<>();
        filterList.add(new FrequencyFilter(configFactory.getConfigProxy().getOutgoingMsgFrequency()));

        return filterList;
    }
}

@@ -780,31 +780,20 @@
         
-getFilterList()
+null
 );%0A    %7D
@@ -1027,24 +1027,139 @@
 ());%0A    %7D%0A%0A
+    // TODO Frequency filter should be revised ; we do not want to filter%0A    // necessary messages for the server%0A
     private 

Remove FrequencyFilter from the ProxyRobotsFactory to avoid filtering necessary messages for the gameplay