This module contains various examples of blocking and non-blocking servers.
Build it the application package using:
> mvn clean package
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.blocking.BlockingEchoServer"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.blocking.BlockingWithWorkerEchoServer"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.nio.NonBlockingServer"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.nio.NonBlockingServerWithAsync"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.netty.NettyEchoServer"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.
Run this example using:
> mvn exec:java -D"exec.mainClass"="org.acme.vertx.VertxEchoServer"
Test it using, in another terminal (also in the module directory):
> mvn exec:java -D"exec.mainClass"="org.acme.client.EchoClient"
Shutdown the server using CTRL+C
.