registry = getDestinationRegistry(bus);
// choose atmosphere if available, otherwise assume jetty is available
if (ATMOSPHERE_AVAILABLE) {
// use atmosphere
return new AtmosphereWebSocketServletDestination(bus, registry,
endpointInfo, endpointInfo.getAddress());
} else {
// use jetty-websocket
return new JettyWebSocketServletDestination(bus, registry,
endpointInfo, endpointInfo.getAddress());