inlineNocacheJs(), channelApiUrl);
}
private void writeLiveClientResponse(HttpServletRequest req, HttpServletResponse resp,
ClientId clientId, LoadedWave wave) throws IOException {
LiveClientVarsGsonImpl vars = new LiveClientVarsGsonImpl();
vars.setClientVersion(clientVersion);
vars.setRandomSeed(random.nextInt());
vars.setUserEmail(participantId.getAddress());
vars.setHaveOauthToken(userContext.hasOAuthCredentials());
vars.setConvSnapshot(wave.getConvSnapshotWithDiffs());
vars.setConvConnectResponse(
sessionHelper.createConnectResponse(
new ObjectSession(wave.getConvObjectId(), clientId, convStore.getRootEntityKind()),
wave.getConvConnectResult()));
if (wave.getUdw() != null) {
UdwLoadDataGsonImpl udwLoadData = new UdwLoadDataGsonImpl();
udwLoadData.setConnectResponse(
sessionHelper.createConnectResponse(
new ObjectSession(wave.getUdw().getObjectId(), clientId,
udwStore.getRootEntityKind()),
wave.getUdw().getConnectResult()));
udwLoadData.setSnapshot(wave.getUdw().getSnapshot());
vars.setUdw(udwLoadData);
}
setResponseHeaders(resp);
Wave.write(resp.getWriter(), new GxpContext(getLocale(req)),
analyticsAccount, clientVarString(vars, null, null), true,
inlineNocacheJs(), channelApiUrl);