options.put(ClientTransport.JSON_CONTEXT_OPTION, new Jackson1JSONContextClient());
options.put(ClientTransport.MAX_NETWORK_DELAY_OPTION, Config.MAX_NETWORK_DELAY);
// Differently from HTTP where the idle timeout is adjusted if it is a /meta/connect
// for WebSocket we need an idle timeout that is longer than the /meta/connect timeout.
options.put(JettyWebSocketTransport.IDLE_TIMEOUT_OPTION, Config.META_CONNECT_TIMEOUT + httpClient.getIdleTimeout());
return new JettyWebSocketTransport(options, scheduler, webSocketClient);
}
default:
{
throw new IllegalArgumentException();
}