有没有实现Bayeux并且能挂在resin上的框架

CometD貌似只能和jetty继承,请问有没有能实现Bayeux的框架能挂在resin上的?

或者别的基于长轮询的框架也成

https://github.com/playframework/play/tree/master/samples-and-tests/chat/app/controllers

这里有利用:
LongPolling(长轮询)
Refresh
WebSocket
的三种实现, 具体得看里面代码。

LongPolling 例子中, 使用了 Play 的 await(Future) , 这个用到了 Play 提供的 Continuation , 具体是什么你得去详细看文档. 简单说就是让线程分片执行, 执行一会停一会执行一会停一会.... 类似 ruby 中的 Fiber。

package controllers;

import play.*;
import play.mvc.*;
import play.libs.F.*;

import java.util.*;
import com.google.gson.reflect.*;

import models.*;

public class LongPolling extends Controller {

    public static void room(String user) {
        ChatRoom.get().join(user);
        render(user);
    }

    public static void say(String user, String message) {
        ChatRoom.get().say(user, message);
    }

    public static void waitMessages(Long lastReceived) {        

        List messages = await(ChatRoom.get().nextMessages(lastReceived));
        renderJSON(messages, new TypeToken<List<IndexedEvent<ChatRoom.Event>>>() {}.getType());
    }

    public static void leave(String user) {
        ChatRoom.get().leave(user);
        Application.index();
    }

}