Search in sources :

Example 1 with TcpActivationParameterControlEvent

use of org.iobserve.utility.tcp.events.TcpActivationParameterControlEvent in project iobserve-analysis by research-iobserve.

the class GenerateConfigurationStage method execute.

@Override
protected void execute() throws Exception {
    AbstractTcpControlEvent element;
    final String hostname = "account-service";
    for (int i = 0; i < this.operations.length; i++) {
        final String operationSignature = this.createSignaturePattern(this.operations[i], this.parameters[i]);
        final long triggerTimestamp = 0;
        final Map<String, List<String>> parameters = new HashMap<>();
        final List<String> blacklist = new ArrayList<>();
        this.populateList(blacklist, this.blackStart, this.blackEnd);
        parameters.put(EListType.BLACKLIST.name(), blacklist);
        final List<String> completeWhitelist = new ArrayList<>(this.whitelist);
        completeWhitelist.add(this.ipv4Generator(127, 0, 0, 1));
        this.populateList(blacklist, this.whiteStart, this.whiteEnd);
        parameters.put(EListType.WHITELIST.name(), completeWhitelist);
        element = new TcpActivationParameterControlEvent(this.host, this.port, hostname, operationSignature, triggerTimestamp, parameters);
        this.outputPort.send(element);
    }
    this.workCompleted();
}
Also used : AbstractTcpControlEvent(org.iobserve.utility.tcp.events.AbstractTcpControlEvent) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) TcpActivationParameterControlEvent(org.iobserve.utility.tcp.events.TcpActivationParameterControlEvent) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 AbstractTcpControlEvent (org.iobserve.utility.tcp.events.AbstractTcpControlEvent)1 TcpActivationParameterControlEvent (org.iobserve.utility.tcp.events.TcpActivationParameterControlEvent)1