Piotr Kliczewski has posted comments on this change. Change subject: [wip] engine: Json-rpc integration ......................................................................
Patch Set 2: (4 comments) .................................................... Commit Message Line 10: way integration is being solved. Line 11: Line 12: I would like to have frequent commits and gather as many comments as Line 13: possible in short loops because there is a bit of changes that needs to Line 14: be done. Good idea will do it Line 15: Line 16: The work is based on Saggi's changes: Line 17: http://gerrit.ovirt.org/#/c/19497/ Line 18: .................................................... File backend/manager/modules/jsonrpc/pom.xml Line 1: <?xml version="1.0"?> Line 2: <project I imported code formater to my eclipse. I am not sure whether it covers xml formatting but will change it to use spaces instead of tabs. Line 3: xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" Line 4: xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> Line 5: <modelVersion>4.0.0</modelVersion> Line 6: <parent> .................................................... File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcUtils.java Line 16: import org.ovirt.engine.jsonrpc.client.reactors.ReactorFactory; Line 17: Line 18: public class JsonRpcUtils { Line 19: private final static String PLAIN_PROTOCOL = "tcp://"; Line 20: private final static String SECURE_PROTOCOL = "tcp+ssl//"; As I said the code is based on Saggi's changes. He used this notation so I adopted it. I believe that Saggi can answer here. Line 21: private static String protocol = PLAIN_PROTOCOL; Line 22: Line 23: public static JsonRpcClient createClient(String hostName, int port, int connectionTimeOut, boolean isSecure) { Line 24: try { Line 37: } Line 38: } Line 39: Line 40: private static URI buildUri(String protocol, String hostname, int port) { Line 41: StringBuilder builder = new StringBuilder(); I would agree if builder was instance variable but you create new one each time you invoke the method so there is no synchronization issue here. Line 42: builder.append(protocol).append(hostname).append(":").append(Integer.toString(port)); Line 43: return URI.create(builder.toString()); Line 44: } -- To view, visit http://gerrit.ovirt.org/20926 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66ef0c98f07de6c447a5fffc42c9dbc94580df46 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: mooli tayer <mta...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches