final FullHttpRequest request,
final ChannelHandlerContext ctx,
final PathParams pathParams) throws Exception {
switch (pathParams.transport()) {
case XHR:
addTransportHandler(new XhrPollingTransport(factory.config(), request), ctx);
addSessionHandler(new PollingSessionState(sessions, getSession(factory, pathParams.sessionId())), ctx);
break;
case JSONP:
addTransportHandler(new JsonpPollingTransport(factory.config(), request), ctx);
addSessionHandler(new PollingSessionState(sessions, getSession(factory, pathParams.sessionId())), ctx);