WebSocketContainer container = ContainerProvider.getWebSocketContainer();
ClientEndpointConfig config = buildClientConfig(configurator);
Session session = container.connectToServer(new LoggregatorEndpoint(listener), config, loggregatorUri);
return new StreamingLogTokenImpl(session);
} catch (DeploymentException e) {
throw new CloudOperationException(e);
} catch (IOException e) {
throw new CloudOperationException(e);
}
}