Nettosphere: A Java WebSocket and HTTP server powered by the Atmosphere Framework and the Netty Framework
The easiest way to get started with NettoSphere is to download a sample and start it. Or look at the Javadoc. You can download the Chat or Jersey Chat distribution.
% unzip nettosphere-<name>-distribution.jar
% chmod a+x ./bin/nettosphere.sh
% ./bin/nettosphere.sh
Samples are the same as then one available in Atmosphere. Bootstrap classes looks like AtmosphereHandler or Jersey
Download Nettosphere here or use Maven
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>nettosphere</artifactId>
<version>1.3</version>
</dependency>
All Atmosphere API supported. As simple as:
Nettosphere server = new Nettosphere.Builder().config(
new Config.Builder()
.host("127.0.0.1")
.port(8080)
.resource(MyResource.class)
.build())
.build();
server.start();
Nettosphere server = new Nettosphere.Builder().config(
new Config.Builder()
.host("127.0.0.1")
.port(8080)
.resource("/*", MyAtmosphereHandler.class)
.build())
.build();
server.start();
Nettosphere server = new Nettosphere.Builder().config(
new Config.Builder()
.host("127.0.0.1")
.port(8080)
.webSocketProtocol(JMSOverWebSocketProtocol.class)
.resource("/*", MyAtmosphereHandler.class)
.build())
.build();
server.start();
Nettosphere server = new Nettosphere.Builder().config(
new Config.Builder()
.host("127.0.0.1")
.port(8080)
.resource("/*", MyServlet.class)
.build())
.build();
server.start();
java -cp nettosphere-all.jar
org.atmosphere.nettosphere.Nettosphere
[/path/to/an/exploded/war/file] [host] [port]
mvn exec:java -Dexec.arguments='path to your exploded war file'
We are on irc.freenode.net under #atmosphere-comet and Twitter