Vojtech Szocs has posted comments on this change. Change subject: webadmin: Small cleanup in RestApiSessionManager ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/35708/2/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/plugin/restapi/RestApiSessionManager.java: Line 147: @Override Line 148: public boolean execute() { Line 149: if (restApiSessionId != null) { Line 150: // The browser takes care of sending JSESSIONID cookie for this request automatically Line 151: sendRequest(createRequest(), new RestApiRequestCallback()); > Oh, so you're suggesting to make both "createRequest" methods pure utility OK, tried to extract "createRequest" methods into static utility methods but this resulted in more code (more method parameters / more complex method call signatures etc.) so I've decided to keep the current approach. RestApiSessionManager is actually the only GUI component making direct calls to REST backend so extracting utility methods here won't have much benefit. When moving GUI code to use REST API, oVirtJS GWT wrapper will delegate to oVirtJS which will handle REST requests on its own, so again we won't need to use such utility methods outside RestApiSessionManager. Line 152: Line 153: // The session is still in use, proceed with the heartbeat Line 154: return true; Line 155: } else { -- To view, visit http://gerrit.ovirt.org/35708 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I98ad53785726c4ed1a8b1eaaf4fd473052496c3e Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vojtech Szocs <[email protected]> Gerrit-Reviewer: Alexander Wels <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
