Giter Site home page Giter Site logo

webbit's Introduction

Webbit - A Java event based WebSocket and HTTP server

Build Status

Getting it

Prebuilt JARs are available from the central Maven repository or the Sonatype Maven repository.

Alternatively, you can get the latest code from Git and build it yourself:

git clone git://github.com/webbit/webbit.git
cd webbit

Make

Build is done with make. On OS-X and Linux this should work out of the box. On Solaris, use gmake. On Windows you will need Cygwin.

make

Maven

mvn install

Quick start

Start a web server on port 8080 and serve some static files:

WebServer webServer = WebServers.createWebServer(8080)
            .add(new StaticFileHandler("/web")) // path to web content
            .start()
            .get();

That was easy.

Now let's build a WebSocketHandler.

public class HelloWebSockets extends BaseWebSocketHandler {
    private int connectionCount;

    public void onOpen(WebSocketConnection connection) {
        connection.send("Hello! There are " + connectionCount + " other connections active");
        connectionCount++;
    }

    public void onClose(WebSocketConnection connection) {
        connectionCount--;
    }

    public void onMessage(WebSocketConnection connection, String message) {
        connection.send(message.toUpperCase()); // echo back message in upper case
    }

    public static void main(String[] args) {
        WebServer webServer = WebServers.createWebServer(8080)
                .add("/hellowebsocket", new HelloWebSockets())
                .add(new StaticFileHandler("/web"));
        webServer.start();
        System.out.println("Server running at " + webServer.getUri());
    }
}

And a page that uses the WebSocket (web/index.html)

<html>
  <body>

    <!-- Send text to websocket -->
    <input id="userInput" type="text">
    <button onclick="ws.send(document.getElementById('userInput').value)">Send</button>

    <!-- Results -->
    <div id="message"></div>

    <script>
      function showMessage(text) {
        document.getElementById('message').innerHTML = text;
      }

      var ws = new WebSocket('ws://' + document.location.host + '/hellowebsocket');
      showMessage('Connecting...');
      ws.onopen = function() { showMessage('Connected!'); };
      ws.onclose = function() { showMessage('Lost connection'); };
      ws.onmessage = function(msg) { showMessage(msg.data); };
    </script>
  </body>
</html>

Contributing

Running JUnit tests

mvn clean test

or

make clean test

Running Autobahn tests

Autobahn is a WebSocket server implemented in Python that comes with an extensive test suite that can be used to test other WebSocket servers as well.

We're using it to test Webbit.

Installing Autobahn

git submodule update --init

Running Autobahn tests

In shell A:

make echo

In shell B:

make autobahn

Open reports/servers/index.html to see the results.

More

webbit's People

Contributors

aslakhellesoy avatar bitdeli-chef avatar bonifaido avatar chtheis avatar clonezone avatar ebaxt avatar hmottestad avatar illicitonion avatar jabley avatar joewalnes avatar jrsacks avatar kushalp avatar manuel-woelker avatar nmische avatar normanmaurer avatar npryce avatar osi avatar petergillardmoss avatar ph2734 avatar rykov avatar s1monw avatar sharvie avatar stesla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webbit's Issues

ClassCastException

I just got this (unknown which version of webbit I'm afraid):

java.lang.ClassCastException: org.jboss.netty.buffer.BigEndianHeapChannelBuffer cannot be cast to org.jboss.netty.handler.codec.http.HttpRequest
    at org.webbitserver.netty.NettyHttpChannelHandler.messageReceived(NettyHttpChannelHandler.java:44)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
    at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

I don't have more details at the moment...

SimpleLogSink shouldn't perform DNS lookups

SimpleLogSink performs a DNS when formatting log entries.

If the examples are following, using a LogginHandler with a SimpleLogSink, all of a sudden there's a blocking DNS request occurring on the main I/O thread.

By default, SimpleLogSink should not perform DNS resolution when logging remote addresses.

Stopping server does not stop server cleanly

I have still an issue with server not stopping cleanly after there has been at least one client.

Tested with Scala version 2.9.0.1 (OpenJDK 64-Bit Server VM, Java 1.6.0_23)
webbit version 78ec141

Tested with following test program.

$ scalac -cp build/webbit-merged.jar test.scala
$ scala -cp build/webbit-merged.jar Test

connect with browser and send text "exit"

test.scala

import org.webbitserver._
import org.webbitserver.handler._
class WebSocketClient(server:WebServer) extends WebSocketHandler {
  override def onPong(conn:WebSocketConnection, msg:String) = {
    print("pong: "+ msg)
  }
  override def onMessage(conn:WebSocketConnection, msg:String) = {
    println("message: "+ msg)
    msg match {
      case "exit" => {
        server.stop;
        println("stopping...");
        server.join
        println("done")
      }
      case _ =>  conn.send(msg.reverse)
    }
  }
  override def onMessage(conn:WebSocketConnection, msg:Array[Byte]) = {}
  override def onClose(conn:WebSocketConnection) = {
    println("close: "+ conn)
  }
  override def onOpen(conn:WebSocketConnection) = {
    println("open: "+ conn)
    conn.send("hello world")
  }
}

object Test {
  def main(args:Array[String]) = {
    val wsServer = WebServers.createWebServer(8080)
    val wsClient = new WebSocketClient(wsServer)
    wsServer.add("/ws", wsClient)
            .add(new StaticFileHandler("."))
    wsServer.start

  }
}

index.html

<html>
  <body>

    <!-- Send text to websocket -->
    <input id="userInput" type="text">
    <button onclick="ws.send(document.getElementById('userInput').value)">Send</button>

    <!-- Results -->
    <div id="message"></div>

    <script>
      function showMessage(text) {
        document.getElementById('message').innerHTML = text;
      }

      var ws = new WebSocket('ws://' + document.location.host + '/ws');
      showMessage('Connecting...');
      ws.onopen = function() { showMessage('Connected!'); };
      ws.onclose = function() { showMessage('Lost connection'); };
      ws.onmessage = function(msg) { showMessage(msg.data); };
    </script>
  </body>
</html>

URL parser

Provide a simple API for parsing an inbound URI into the respective components (path and query parameters)

WebSocket "multicast"

Given a bunch of WebSocketConnections, I would like to send the same String message to all of them.

Currently, this is expensive as a new ChannelBuffers.copiedBuffer(textData, CharsetUtil.UTF_8) is done for each.

It would be nice to have away to give webbit a WebSocketConnection[] and have it perform the String->byte[] conversion a single time.

Exception Handling

Should this be left to the implementor on their app or be handled explicitly by Webbit? Just looking around at the various ways we're catching/throwing exceptions and it's not consistent.

Expose onPing

Currently, if we receive a WebSocket ping message, we send a pong back immediately. It would be nice if this responsibility was delegated to the handler. We'd also need to add a connection.sendPong methos as well.

New 0.4.9 ThreadFactory creating daemon threads

This came from one of my colleagues. @s1monw any comments?


42c0fad

This change is seemingly harmless in that it is simply adding names to various webbit threads.
The problem is that the ThreadFactory implementation is creating daemon threads. For apps that are relying on the webbit threads to be user threads in order to keep the app alive, they will simply exit after calling start.

I’m pretty sure this is not the intention since every sample creates a WebServer and starts it. To see the behavior, choose any of the webbit sample apps, run it, and observe that it exits out and doesn’t stay alive. Since NamedThreadFactory seems to have been copied from another project, I’m not sure if the proper fix is the flip isDaemon(false) in NamedThreadFactory.newThread(). I suppose we could just remove the “copied from Lucene” comment so there is no confusion. Let me know how we should go about fixing this.

First incoming WebSocket message is dropped on the floor

To reproduce, change fuzzing_client_spec.json to only run one test, for example:

"cases": ["1.1.5"],

Start the echo server (make echo) and run the single autobahn test: make autobahn
Look at reports/servers/index.html and see that the test failed.

Now, with the echo server still running, run make autobahn again. This time it will pass.

This happens with testcase 1.1.1, 1.1.2, 1.1.3, 1.1.4 and 1.1.5 - but not with 1.1.6. (The 1.1.6 testcase passes on the first try).

One thing I tried was to add a System.out.println("b = " + b); on line 72 in HybiWebSocketFrameDecoder. The first (failing) time only one byte is printed (and the message is not fully read), but for subsequent autobahn invocations two bytes are printed (and the message is fully read).

This is an annoying bug that it would be great to get some help to fix!

Allow setting the port when the WebServer is actual started

Maybe I do strange things ... :)

I use the WebServer as an embedded server. The server is setup once, i.e., all handlers added and started / stopped by the use. Before actually starting the server the user may change the port the server is listening on. Unfortunately here the port can only be set when the server instance is created, though those settings aren't used until the server is actually started.

I have a patch where the server has a default constructor (no port at all) and a start method with a port parameter. The port must be specified once (at least), either in the constructor or in the start method.

Android doesn't work when using web-socket-js

Tried websocket server on Android (Galaxy SII and Motorola Zoom) and both doesn't connect to websocket server. I've tried this on an iPad and Chrome on the PC and it works without issue :(

webServer = WebServers.createWebServer(port)
.add("/", this) // path to web content
.start();

(this implements WebSocketHandler).

HTTP forwarding proxy handler

Create a handler that simply proxies requests through to another web server.

This can be used to map paths to other systems.

Similar to Apache mod_proxy.

Restart NettyWebServer

Shall it be possible to stop and start the Webserver whithout creating a new instance?
When I call "stop()" and then "start()" again on NettyWebServer I get an IllegalStateException, because the boostrap object already has a factory. When I change the code and put the setting up of the boostrap object from the constructor to the start method and set boostrap to null in the stop method, it works. At least there are no apparent errors :)

Christoph

HTTP caching in StaticFileHandler

Serve appropriate HTTP headers, and deal with HEAD requests, so browsers/proxies don't refetch the content unless they need to. This could be based on file modification time.

Sinatra style path mappings

Allow Sinatra style path mappings.

e.g.

// for example: http://host/news/technology/22
webServer.add("/news/:section/:article_id", new HttpHandler() {
void handle(...) {
String section = req.parameter("section");
String articleId = req.parameter("article_id");
}
});

Add example for binary WebSocket messages

Any suggestions about what the example should do? Perhaps a web page where you can drag an image from the desktop, it gets sent to the server, some colour or 2d transformation, and stream it back?

Protocol mismatch during SSL handshake (disables Safari)

Webbit secure websockets work fine in Chrome or Firefox, but when using Safari it reveals a cross-domain issue:

Error during WebSocket handshake: location mismatch: wss://domain.com:5679/ != ws://domain.com:5679/

Looks like a bug in Webbit itself.

Compile Errors using webbit-0.4.0-full.jar

Trying to compile the Quick Start WebSocketHandler in the README.md against the webbit-0.4.0-full.jar.
Doing the same compile against the webbit-0.3.8-full.jar is OK.
In both cases I'm using Oracle's 1.6 JRE in the Eclipse IDE.

Think the WebSocketHandler example code needs updating for 0.4.0 as there is now an onPing method required and the existing onPong method now uses byte[] instead of String for message.

Also getting:

Type mismatch: cannot convert from Future<capture#1-of ? extends > WebServer>to WebServer

on the code that creates the WebServer.

Its the Type mismatch that has me completely stuck!!

Update to the new Autobahn test suite

Webbit is currently tracking a non-existent Autobahn repo as a submodule.

Rather than explicitly calling a submodule, the virtualenv file can be update to use the package that has been built instead.

Here's the command to get the new Autobahn testsuite through pip: pip install autobahntestsuite

Support HTTP partial content ranges

When the browser makes a request specifying the 'Range' header, Webbit should respond with HTTP 206 (Partial Content) instead of HTTP 200 and the appropriate Content-Range and Accept-Ranges headers.

At the moment, it doesn't and it manifests itself as a weird sound reliability bug. Chrome will make a Range request for specific types of media - such as audio and video. It appears to serve the content correctly, but attempting to play() the media a second time fails. I've verified (using Apache HTTPD) that this is not an issue if HTTP Range is implemented correctly.


Here's a TCP dump of a conversation between Chrome and the webserver for loading a sound via the tag. The first version is with Webbit, the second with Apache HTTPD.

Webbit:

GET /foo.wav HTTP/1.1 
Host: localhost
Connection: keep-alive
Cache-Control: max-age=0
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.816.0 Safari/535.1
Accept: */*
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Range: bytes=0-

HTTP/1.1 200 OK
Server: Webbit
Content-Length: 46198

blahblahblah...

Apache:

GET /foo.wav HTTP/1.1
Host: localhost
Connection: keep-alive
Cache-Control: max-age=0
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.816.0 Safari/535.1
Accept: */*
Accept-Language: en-US,en;q=0.8 
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Range: bytes=0-

HTTP/1.1 206 Partial Content
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"184364-1320695950000"
Last-Modified: Mon, 07 Nov 2011 19:59:10 GMT
Content-Range: bytes 0-184363/184364
Content-Type: audio/x-wav
Content-Length: 46198
Date: Tue, 08 Nov 2011 23:00:47 GMT

blahblahblah...

Test with Autobahn

I have integrated Autobahn's awesome test suite on my master branch. It has 200 test cases, which should help us weed out any bugs in the WebSocket implementation. Instructions about how to set it up and run it is in the README.

The annoying thing is that the first test fails. (You can run a subset of tests by setting e.g. "cases": ["1.1.2"] in fuzzing_client_spec.json).

The problem is that the connection is closed immediately after connection - before any messages are received. I'm not sure what's causing this. I was able to run all of the tests agains Jetty without problems.

Any idea what could be causing this?

In memory session storage handler

Add a handler that allows simple in-memory session support.

This should not be enabled by default - users should explicitly add it if they want it. It should also act as an example to allow other projects to create more advanced session storage mechanism (e.g. based on a distributed cache, or Redis).

Flash based WebSockets

In lieu of full Socket.IO support (issue 18), at least support Flash based WebSockets, so more browsers can make use of Webbit.

https://github.com/gimite/web-socket-js

Although this sounds like it should be a separate project, it may be awkward, because the Flash policy checking mechanism doesn't speak valid HTTP, so it may require the underlying networking code to be changed.

Running `make test` fails

Here's the output:

$ make test
java -cp dist/webbit.jar:build/webbit-tests.jar:lib/autojar.jar:lib/gson-1.7.2.jar:lib/jarjar-1.1.jar:lib/junit-4.10.jar:lib/mockito-all-1.9.0-rc1.jar:lib/netty-3.2.7.Final.jar org.junit.runner.JUnitCore org.webbitserver.EventSourceMessageTest org.webbitserver.handler.AliasHandlerTest org.webbitserver.handler.authentication.InMemoryPasswordsTest org.webbitserver.handler.CompressionTest org.webbitserver.handler.CookieTest org.webbitserver.handler.EmbeddedResourceHandlerTest org.webbitserver.handler.PathMatchHandlerTest org.webbitserver.handler.PostTest org.webbitserver.handler.ServerHeaderHandlerTest org.webbitserver.handler.SslTest org.webbitserver.handler.StaleConnectionTest org.webbitserver.handler.StaticFileHandlerTest org.webbitserver.helpers.Base64Test org.webbitserver.helpers.HexTest org.webbitserver.helpers.InboundCookieParserTest org.webbitserver.helpers.QueryParametersTest org.webbitserver.helpers.UTF8OutputTest org.webbitserver.HttpRequestTest org.webbitserver.InboundCookieParserTest org.webbitserver.netty.contrib.EventSourceMessageTest org.webbitserver.netty.FlashPolicyFileTest org.webbitserver.netty.NettyWebServerTest org.webbitserver.netty.ReconnectingWebSocketClientTest org.webbitserver.netty.WsClientTest org.webbitserver.netty.WssClientTest org.webbitserver.stub.StubConnectionTest org.webbitserver.stub.StubHttpRequestTest org.webbitserver.WebbitExceptionTest
JUnit version 4.10
.......................................................................................E.E.E.E.E.E.E.E.E.E.E.E.E...............I.....I.....................
Time: 2.545
There were 13 failures:
1) skipsColonIfValueEmpty(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.id(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.skipsColonIfValueEmpty(EventSourceMessageTest.java:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
2) encodesSingleLine(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.data(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesSingleLine(EventSourceMessageTest.java:15)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
3) encodesSeveralLines(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.data(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesSeveralLines(EventSourceMessageTest.java:20)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
4) encodesId(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.data(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesId(EventSourceMessageTest.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
5) encodesComment(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.data(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesComment(EventSourceMessageTest.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
6) encodesIdAsLong(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.id(J)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesIdAsLong(EventSourceMessageTest.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
7) encodesIdAsString(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.id(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesIdAsString(EventSourceMessageTest.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
8) encodesEvent(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.event(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesEvent(EventSourceMessageTest.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
9) encodesRetry(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.retry(Ljava/lang/Long;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.encodesRetry(EventSourceMessageTest.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
10) emptyBuild(org.webbitserver.netty.contrib.EventSourceMessageTest)
org.junit.ComparisonFailure: expected:<[]> but was:<[
]>
    at org.junit.Assert.assertEquals(Assert.java:125)
    at org.junit.Assert.assertEquals(Assert.java:147)
    at org.webbitserver.netty.contrib.EventSourceMessageTest.emptyBuild(EventSourceMessageTest.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
11) buildsMessageWithData(org.webbitserver.netty.contrib.EventSourceMessageTest)
org.junit.ComparisonFailure: expected:<data: testing
[]> but was:<data: testing
[
]>
    at org.junit.Assert.assertEquals(Assert.java:125)
    at org.junit.Assert.assertEquals(Assert.java:147)
    at org.webbitserver.netty.contrib.EventSourceMessageTest.buildsMessageWithData(EventSourceMessageTest.java:62)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
12) buildsMessageWithEmptyData(org.webbitserver.netty.contrib.EventSourceMessageTest)
org.junit.ComparisonFailure: expected:<
[]> but was:<
[
]>
    at org.junit.Assert.assertEquals(Assert.java:125)
    at org.junit.Assert.assertEquals(Assert.java:147)
    at org.webbitserver.netty.contrib.EventSourceMessageTest.buildsMessageWithEmptyData(EventSourceMessageTest.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
13) buildsMessageWithNullId(org.webbitserver.netty.contrib.EventSourceMessageTest)
java.lang.NoSuchMethodError: org.webbitserver.netty.contrib.EventSourceMessage.id(Ljava/lang/String;)Lorg/webbitserver/netty/contrib/EventSourceMessage;
    at org.webbitserver.netty.contrib.EventSourceMessageTest.buildsMessageWithNullId(EventSourceMessageTest.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:24)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
    at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
    at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
    at org.junit.runner.JUnitCore.main(JUnitCore.java:45)

FAILURES!!!
Tests run: 140,  Failures: 13

make: *** [build/.tests-pass] Error 1

Mongrel2 support

I'm curious how Mongrel2 would compare to Netty.

An implementation wouldn't be too hard - most of the hard work has been done by Armando Singer

Mongrel2 would run as a separate process, and communication between Webbit<->Mongrel2 is ØMQ. A Mongrel2 implementation would start and stop the Mongrel2 instance.

Mailing list

Can we have one?

I'd like to discuss adding a REST API (a la jersey/restlet)

WebSocket message connectors

This is a placeholder for some seperate projects based on Webbit...

Provide server side handlers, and client side JS APIs that make it easy for pages to connect to backend message queues.

Would like to support XMPP, AMQP and STOMP protocols, as well as any system that supports the JMS API. Maybe also a simple TCP socket library to allow custom connections to virtually anything.

For example, assuming there was an AMQP server (such as RabbitMQ) already running on 'amqp.mydomain.com'...
Webbit could be deployed with
.add("/amqp", new AmqpBridge("amqp.mydomain.com"))

And then web-pages could interact with the a client side AMQP library, like this:
var amqp = new AmqpConnection('/amqp');
var queue = connection.queues['some-queue'];

queue.onmessage = function(msg) {
  // some message.
}
queue.send('hello world');

POST bodies truncated at 65K

I'm POSTing data to a Webbit server and sometimes the bodies are big. When this happens the data received by Webbit has been truncated at 65536 bytes.

I've sniffed the traffic between the client and server, and this is the request sent:

POST /api/history HTTP/1.1
Host: localhost:1337
Content-Type: application/json
Connection: keep-alive
Accept: */*
User-Agent: NING/1.0
Content-Length: 695965

(big chunk of JSON)

on the server side I then print out the value of the Content-Length header and the size of request.body() (and request.bodyAsBytes()) and both tell me 65536. Is this a bug, or something I can configure my way around?

'HelpMeDoTheRightThing' Handler

Handler that will introspect how the request, response and control are interacted with and warn if the application does things that it shouldn't.

  • Interact with request/response/control from any thread other than the main server event loop.
  • Performs blocking file or network based IO on the main server event loop (could be inforced by looking at time, or maybe using a security manager, like http://ashcroft.codehaus.org/).
  • Check response/control methods are called in correct order. e.g. headers before content before end.

Maybe this should be on by default?

Upgrade Netty

You should use io.netty now instead of org.jboss.netty

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.