{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/177443848","pull_request_review_id":107313898,"id":177443848,"diff_hunk":"@@ -0,0 +1,90 @@\n+/**\n+ * Copyright (c) 2014,2018 Contributors to the Eclipse Foundation\n+ *\n+ * See the NOTICE file(s) distributed with this work for additional\n+ * information regarding copyright ownership.\n+ *\n+ * This program and the accompanying materials are made available under the\n+ * terms of the Eclipse Public License 2.0 which is available at\n+ * http://www.eclipse.org/legal/epl-2.0\n+ *\n+ * SPDX-License-Identifier: EPL-2.0\n+ */\n+package org.eclipse.smarthome.io.transport.mqtt;\n+\n+import org.apache.commons.lang.StringUtils;\n+import org.eclipse.jdt.annotation.Nullable;\n+\n+/**\n+ * Contains configuration for a MqttBrokerConnection. Necessary to add a new broker connection the {@link MqttService}.\n+ *\n+ * @author David Graeff - Initial contribution and API\n+ */\n+public class MqttBrokerConnectionConfig {\n+    // Optional connection name\n+    public @Nullable String name;\n+    // Connection parameters (host+port+secure)\n+    public @Nullable String host;\n+    public @Nullable Integer port;\n+    public Boolean secure = true;\n+    // Authentication parameters\n+    public @Nullable String username;\n+    public @Nullable String password;\n+    public @Nullable String clientID;\n+    // MQTT parameters\n+    public Integer qos = MqttBrokerConnection.DEFAULT_QOS;\n+    public Boolean retainMessages = false;\n+    /** Keepalive in seconds */\n+    public @Nullable Integer keepAlive;\n+    // Last will parameters\n+    public @Nullable String lwtTopic;","path":"bundles/io/org.eclipse.smarthome.io.transport.mqtt/src/main/java/org/eclipse/smarthome/io/transport/mqtt/MqttBrokerConnectionConfig.java","position":40,"original_position":40,"commit_id":"1a2e05b1db3638dcab8a2e384d343c55017bb27d","original_commit_id":"eea26577bac6e316d30a7112fe1d1443bef42f08","user":{"login":"htreu","id":1729268,"avatar_url":"https://avatars2.githubusercontent.com/u/1729268?v=4","gravatar_id":"","url":"https://api.github.com/users/htreu","html_url":"https://github.com/htreu","followers_url":"https://api.github.com/users/htreu/followers","following_url":"https://api.github.com/users/htreu/following{/other_user}","gists_url":"https://api.github.com/users/htreu/gists{/gist_id}","starred_url":"https://api.github.com/users/htreu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htreu/subscriptions","organizations_url":"https://api.github.com/users/htreu/orgs","repos_url":"https://api.github.com/users/htreu/repos","events_url":"https://api.github.com/users/htreu/events{/privacy}","received_events_url":"https://api.github.com/users/htreu/received_events","type":"User","site_admin":false},"body":"@maggu2810 fine for you?","created_at":"2018-03-27T14:24:30Z","updated_at":"2018-03-27T14:24:30Z","html_url":"https://github.com/eclipse/smarthome/pull/4173#discussion_r177443848","pull_request_url":"https://api.github.com/repos/eclipse/smarthome/pulls/4173","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/177443848"},"html":{"href":"https://github.com/eclipse/smarthome/pull/4173#discussion_r177443848"},"pull_request":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/4173"}},"in_reply_to_id":177361031},"pull_request":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/4173","id":138846209,"html_url":"https://github.com/eclipse/smarthome/pull/4173","diff_url":"https://github.com/eclipse/smarthome/pull/4173.diff","patch_url":"https://github.com/eclipse/smarthome/pull/4173.patch","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/4173","number":4173,"state":"open","locked":false,"title":"MqttService: Remove all deprecated methods, rename close to stop.","user":{"login":"davidgraeff","id":66436,"avatar_url":"https://avatars2.githubusercontent.com/u/66436?v=4","gravatar_id":"","url":"https://api.github.com/users/davidgraeff","html_url":"https://github.com/davidgraeff","followers_url":"https://api.github.com/users/davidgraeff/followers","following_url":"https://api.github.com/users/davidgraeff/following{/other_user}","gists_url":"https://api.github.com/users/davidgraeff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgraeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgraeff/subscriptions","organizations_url":"https://api.github.com/users/davidgraeff/orgs","repos_url":"https://api.github.com/users/davidgraeff/repos","events_url":"https://api.github.com/users/davidgraeff/events{/privacy}","received_events_url":"https://api.github.com/users/davidgraeff/received_events","type":"User","site_admin":false},"body":"This PR prepares the io.transport.mqtt bundle for the discussed MQTT architecture.\r\n\r\n* Remove `name` from MqttBrokerConnection. This is only necessary for the MqttService.\r\n  Consumers of MqttBrokerConnection should not be bothered with this detail.\r\n* The MqttService requires a brokerID for addConnection() and removeConnection() and the observer interface adds the brokerID next to the connection as well, to compensate for the removed `name`.\r\n* Remove `textualConfigured` flag. Again this is not interesting for anything outside MqttService.\r\n* Don't parse configuration parameters ourselves, but use a configuration values class instead.\r\n* Use Nullable where it makes sense.\r\n* The code was modernized\r\n\r\nAPI break:\r\n* All deprecated methods are removed.\r\n* MqttBrokerConnection.close -> stop\r\n* MqttBrokerConnection.getURL() -> getHost(), getPort(), isSecure().\r\n* MqttBrokerConnection constructor changed\r\n\r\nConfig interface break:\r\n* There is no \"url\" anymore, it is now \"host\"+\"port\"+\"secure\"\r\n* \"retain\" is now \"retainMessages\"\r\n* \"user\" is now \"username\"\r\n* \"pass\" is now \"password\"\r\n* \"lw\" is now \"lwtTopic\"+\"lwtMessage\"+\"lwtQos\"+\"lwtRetain\"\r\n* \"clientid\" is now \"clientID\"\r\n* Uses OSGI service factories. \r\n\r\nDocumentation\r\n* Add more public class documentation especially for `MqttService` and its purpose.\r\n\r\nFixes #4170\r\n\r\nSigned-off-by: David Gräff <david.graeff@web.de>","created_at":"2017-09-01T09:06:42Z","updated_at":"2018-03-27T14:24:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a576877a84127387e890952a33fedc5f71b06ba3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/smarthome/pulls/4173/commits","review_comments_url":"https://api.github.com/repos/eclipse/smarthome/pulls/4173/comments","review_comment_url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/4173/comments","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/1a2e05b1db3638dcab8a2e384d343c55017bb27d","head":{"label":"davidgraeff:mqttservice","ref":"mqttservice","sha":"1a2e05b1db3638dcab8a2e384d343c55017bb27d","user":{"login":"davidgraeff","id":66436,"avatar_url":"https://avatars2.githubusercontent.com/u/66436?v=4","gravatar_id":"","url":"https://api.github.com/users/davidgraeff","html_url":"https://github.com/davidgraeff","followers_url":"https://api.github.com/users/davidgraeff/followers","following_url":"https://api.github.com/users/davidgraeff/following{/other_user}","gists_url":"https://api.github.com/users/davidgraeff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgraeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgraeff/subscriptions","organizations_url":"https://api.github.com/users/davidgraeff/orgs","repos_url":"https://api.github.com/users/davidgraeff/repos","events_url":"https://api.github.com/users/davidgraeff/events{/privacy}","received_events_url":"https://api.github.com/users/davidgraeff/received_events","type":"User","site_admin":false},"repo":{"id":94952984,"name":"smarthome","full_name":"davidgraeff/smarthome","owner":{"login":"davidgraeff","id":66436,"avatar_url":"https://avatars2.githubusercontent.com/u/66436?v=4","gravatar_id":"","url":"https://api.github.com/users/davidgraeff","html_url":"https://github.com/davidgraeff","followers_url":"https://api.github.com/users/davidgraeff/followers","following_url":"https://api.github.com/users/davidgraeff/following{/other_user}","gists_url":"https://api.github.com/users/davidgraeff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgraeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgraeff/subscriptions","organizations_url":"https://api.github.com/users/davidgraeff/orgs","repos_url":"https://api.github.com/users/davidgraeff/repos","events_url":"https://api.github.com/users/davidgraeff/events{/privacy}","received_events_url":"https://api.github.com/users/davidgraeff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidgraeff/smarthome","description":"Eclipse SmartHome™ project","fork":true,"url":"https://api.github.com/repos/davidgraeff/smarthome","forks_url":"https://api.github.com/repos/davidgraeff/smarthome/forks","keys_url":"https://api.github.com/repos/davidgraeff/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidgraeff/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidgraeff/smarthome/teams","hooks_url":"https://api.github.com/repos/davidgraeff/smarthome/hooks","issue_events_url":"https://api.github.com/repos/davidgraeff/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/davidgraeff/smarthome/events","assignees_url":"https://api.github.com/repos/davidgraeff/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/davidgraeff/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/davidgraeff/smarthome/tags","blobs_url":"https://api.github.com/repos/davidgraeff/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidgraeff/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidgraeff/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidgraeff/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidgraeff/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/davidgraeff/smarthome/languages","stargazers_url":"https://api.github.com/repos/davidgraeff/smarthome/stargazers","contributors_url":"https://api.github.com/repos/davidgraeff/smarthome/contributors","subscribers_url":"https://api.github.com/repos/davidgraeff/smarthome/subscribers","subscription_url":"https://api.github.com/repos/davidgraeff/smarthome/subscription","commits_url":"https://api.github.com/repos/davidgraeff/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidgraeff/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidgraeff/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidgraeff/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidgraeff/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/davidgraeff/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidgraeff/smarthome/merges","archive_url":"https://api.github.com/repos/davidgraeff/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidgraeff/smarthome/downloads","issues_url":"https://api.github.com/repos/davidgraeff/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/davidgraeff/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/davidgraeff/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/davidgraeff/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidgraeff/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/davidgraeff/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/davidgraeff/smarthome/deployments","created_at":"2017-06-21T02:07:59Z","updated_at":"2018-03-27T13:52:45Z","pushed_at":"2018-03-27T14:06:58Z","git_url":"git://github.com/davidgraeff/smarthome.git","ssh_url":"git@github.com:davidgraeff/smarthome.git","clone_url":"https://github.com/davidgraeff/smarthome.git","svn_url":"https://github.com/davidgraeff/smarthome","homepage":"https://www.eclipse.org/smarthome/","size":45136,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"epl-2.0","name":"Eclipse Public License 2.0","spdx_id":"EPL-2.0","url":"https://api.github.com/licenses/epl-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"336878dafda06a4c88dc8e86510ae930027a4cae","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":15778981,"name":"smarthome","full_name":"eclipse/smarthome","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/smarthome","description":"Eclipse SmartHome™ project","fork":false,"url":"https://api.github.com/repos/eclipse/smarthome","forks_url":"https://api.github.com/repos/eclipse/smarthome/forks","keys_url":"https://api.github.com/repos/eclipse/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/smarthome/teams","hooks_url":"https://api.github.com/repos/eclipse/smarthome/hooks","issue_events_url":"https://api.github.com/repos/eclipse/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/smarthome/events","assignees_url":"https://api.github.com/repos/eclipse/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/smarthome/tags","blobs_url":"https://api.github.com/repos/eclipse/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/smarthome/languages","stargazers_url":"https://api.github.com/repos/eclipse/smarthome/stargazers","contributors_url":"https://api.github.com/repos/eclipse/smarthome/contributors","subscribers_url":"https://api.github.com/repos/eclipse/smarthome/subscribers","subscription_url":"https://api.github.com/repos/eclipse/smarthome/subscription","commits_url":"https://api.github.com/repos/eclipse/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/smarthome/merges","archive_url":"https://api.github.com/repos/eclipse/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/smarthome/downloads","issues_url":"https://api.github.com/repos/eclipse/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/smarthome/deployments","created_at":"2014-01-09T20:47:19Z","updated_at":"2018-03-27T14:00:31Z","pushed_at":"2018-03-27T14:07:00Z","git_url":"git://github.com/eclipse/smarthome.git","ssh_url":"git@github.com:eclipse/smarthome.git","clone_url":"https://github.com/eclipse/smarthome.git","svn_url":"https://github.com/eclipse/smarthome","homepage":"https://www.eclipse.org/smarthome/","size":50324,"stargazers_count":665,"watchers_count":665,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":647,"mirror_url":null,"archived":false,"open_issues_count":429,"license":{"key":"epl-2.0","name":"Eclipse Public License 2.0","spdx_id":"EPL-2.0","url":"https://api.github.com/licenses/epl-2.0"},"forks":647,"open_issues":429,"watchers":665,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/4173"},"html":{"href":"https://github.com/eclipse/smarthome/pull/4173"},"issue":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/4173"},"comments":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/4173/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/4173/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/4173/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/smarthome/statuses/1a2e05b1db3638dcab8a2e384d343c55017bb27d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"htreu"}}