Package bbejeck.nio.sockets

Examples of bbejeck.nio.sockets.PlainSocketMessageSender.sendMessages()


            }
        });
        System.out.println("Starting the AsyncSocketServer Test");
        new Thread(asyncFutureTask).start();
        Thread.sleep(1000);
        messageSender.sendMessages();
        Long time = asyncFutureTask.get();
        System.out.println("AsyncServer processed [10000] messages  in " + time+" seconds");
    }
   
    @Test
View Full Code Here


            }
        });

        new Thread(plainFutureTask).start();
        Thread.sleep(1000);
        messageSender.sendMessages();
        Long time = plainFutureTask.get();
        System.out.println("PlainSocketServer processed [10000] messages  in " + time +" seconds");
    }

}
View Full Code Here

        });
        System.out.println("Starting the AsyncSocketServer Test");
        new Thread(asyncFutureTask).start();
        long sleepTime = 50;
        Thread.sleep(sleepTime);
        messageSender.sendMessages();
        Long time = asyncFutureTask.get();
        System.out.println("AsyncServer processed [10000] messages  in " + (time - sleepTime) + " millis");
    }
}
View Full Code Here

        });

        new Thread(plainFutureTask).start();
        long sleepTime = 50;
        Thread.sleep(sleepTime);
        messageSender.sendMessages();
        Long time = plainFutureTask.get();
        System.out.println("PlainSocketServer processed [10000] messages  in " + (time - sleepTime) + " millis");
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.