Package javaflow.network.api

Examples of javaflow.network.api.Network


import javaflow.network.impl.SimpleNetworkBuilder;

public class SpeedTest {
    public static void main(String[] args) {
        final int messageCount = 10000000;
        Network network = new SimpleNetworkBuilder().build(new NetworkDefiner() {{
            from(c("generator", Generator.class)).to(c("expectPackets", ExpectPackets.class));

            from("generator", "STARTNOTIFY").to("START", c("timer", Timer.class));
            from("expectPackets", "ENDNOTIFY").to("END", "timer");

            from("timer").to("TIME",c("results", Results.class));

            message(messageCount).to("COUNT", "generator");
            message(messageCount).to("COUNT", "results");
            message(messageCount).to("COUNT", "expectPackets");

        }});
        network.runInCurrentThread();
    }
View Full Code Here

TOP

Related Classes of javaflow.network.api.Network

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.