public static BayeuxRequest getRequest(TomcatBayeux tomcatBayeux, CometEvent event, JSONObject msg) throws JSONException {
String channel = msg.optString(Bayeux.CHANNEL_FIELD);
if (Bayeux.META_HANDSHAKE.equals(channel)) {
return new MetaHandshakeRequest(tomcatBayeux,event,msg);
}else if (Bayeux.META_CONNECT.equals(channel)) {
return new MetaConnectRequest(tomcatBayeux,event,msg);
}else if (Bayeux.META_DISCONNECT.equals(channel)) {
return new MetaDisconnectRequest(tomcatBayeux,event,msg);
}else if (Bayeux.META_SUBSCRIBE.equals(channel)) {
return new MetaSubscribeRequest(tomcatBayeux,event,msg);
}else if (Bayeux.META_UNSUBSCRIBE.equals(channel)) {