* Signs the ObjectSession and puts it in a ConnectResponse together with the
* ConnectResult.
*/
public ConnectResponseGsonImpl createConnectResponse(
ObjectSession session, ConnectResult result) {
ConnectResponseGsonImpl response = new ConnectResponseGsonImpl();
SignedObjectSessionGsonImpl signedSession = createSignedSession(session);
response.setSignedSession(signedSession);
response.setSignedSessionString(GsonProto.toJson(signedSession));
if (result.getChannelToken() != null) {
response.setChannelToken(result.getChannelToken());
}
response.setObjectVersion(result.getVersion());
return response;
}