{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/168882056","pull_request_review_id":97330784,"id":168882056,"diff_hunk":"@@ -0,0 +1,51 @@\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.net.http;\n+\n+import org.eclipse.jetty.client.HttpClient;\n+\n+/**\n+ * Factory class to create jetty http clients\n+ *\n+ * @author Michael Bock - initial API\n+ */\n+public interface HttpClientFactory {\n+\n+    /**\n+     * Creates a new jetty http client..\n+     * The returned client is already started but must be stopped\n+     * by the consumer after usage. The client lifecycle should be the same as for the consumer.\n+     * DO NOT CREATE NEW CLIENTS FOR EACH REQUEST!\n+     * \n+     * @param consumerName the for identifying the consumer in the jetty thread pool.\n+     *            Must be between 4 and 20 characters long and must contain only the following characters [a-zA-Z0-9-_]\n+     * @param endpoint the desired endpoint, protocol and host are sufficient\n+     * @return the jetty client\n+     * @throws NullPointerException if {@code endpoint} or {@code consumerName} is {@code null}\n+     * @throws IllegalArgumentException if {@code consumerName} is invalid\n+     */\n+    HttpClient createHttpClient(String consumerName, String endpoint);\n+\n+    /**\n+     * Returns the shared jetty http client.\n+     * The returned client is already started\n+     * by the consumer after usage. The client lifecycle should be the same as for the consumer.\n+     * DO NOT CREATE NEW CLIENTS FOR EACH REQUEST!\n+     * \n+     * @param consumerName the for identifying the consumer in the jetty thread pool.","path":"bundles/io/org.eclipse.smarthome.io.net/src/main/java/org/eclipse/smarthome/io/net/http/HttpClientFactory.java","position":45,"original_position":45,"commit_id":"aec6045ed4d5c2ab5d28d62955a0afc11cefdd1d","original_commit_id":"aec6045ed4d5c2ab5d28d62955a0afc11cefdd1d","user":{"login":"amitjoy","id":13380182,"avatar_url":"https://avatars0.githubusercontent.com/u/13380182?v=4","gravatar_id":"","url":"https://api.github.com/users/amitjoy","html_url":"https://github.com/amitjoy","followers_url":"https://api.github.com/users/amitjoy/followers","following_url":"https://api.github.com/users/amitjoy/following{/other_user}","gists_url":"https://api.github.com/users/amitjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitjoy/subscriptions","organizations_url":"https://api.github.com/users/amitjoy/orgs","repos_url":"https://api.github.com/users/amitjoy/repos","events_url":"https://api.github.com/users/amitjoy/events{/privacy}","received_events_url":"https://api.github.com/users/amitjoy/received_events","type":"User","site_admin":false},"body":"No need of @param as this is a no-argument method","created_at":"2018-02-16T22:04:46Z","updated_at":"2018-02-16T22:04:46Z","html_url":"https://github.com/eclipse/smarthome/pull/5079#discussion_r168882056","pull_request_url":"https://api.github.com/repos/eclipse/smarthome/pulls/5079","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/168882056"},"html":{"href":"https://github.com/eclipse/smarthome/pull/5079#discussion_r168882056"},"pull_request":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/5079"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/5079","id":168858917,"html_url":"https://github.com/eclipse/smarthome/pull/5079","diff_url":"https://github.com/eclipse/smarthome/pull/5079.diff","patch_url":"https://github.com/eclipse/smarthome/pull/5079.patch","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/5079","number":5079,"state":"open","locked":false,"title":"Jetty http client factory","user":{"login":"sobimibos","id":18039078,"avatar_url":"https://avatars1.githubusercontent.com/u/18039078?v=4","gravatar_id":"","url":"https://api.github.com/users/sobimibos","html_url":"https://github.com/sobimibos","followers_url":"https://api.github.com/users/sobimibos/followers","following_url":"https://api.github.com/users/sobimibos/following{/other_user}","gists_url":"https://api.github.com/users/sobimibos/gists{/gist_id}","starred_url":"https://api.github.com/users/sobimibos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobimibos/subscriptions","organizations_url":"https://api.github.com/users/sobimibos/orgs","repos_url":"https://api.github.com/users/sobimibos/repos","events_url":"https://api.github.com/users/sobimibos/events{/privacy}","received_events_url":"https://api.github.com/users/sobimibos/received_events","type":"User","site_admin":false},"body":"A frist draft of the http client factory, which create jetty clients using a common thread pool.\r\n\r\nSigned-off-by: Michael Bock <mbock@gmxpro.de>","created_at":"2018-02-13T14:29:40Z","updated_at":"2018-02-16T22:04:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f843d4c9b29c8e1a9ed791ed6ba895e45604e69","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/smarthome/pulls/5079/commits","review_comments_url":"https://api.github.com/repos/eclipse/smarthome/pulls/5079/comments","review_comment_url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/5079/comments","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/aec6045ed4d5c2ab5d28d62955a0afc11cefdd1d","head":{"label":"sobimibos:master","ref":"master","sha":"aec6045ed4d5c2ab5d28d62955a0afc11cefdd1d","user":{"login":"sobimibos","id":18039078,"avatar_url":"https://avatars1.githubusercontent.com/u/18039078?v=4","gravatar_id":"","url":"https://api.github.com/users/sobimibos","html_url":"https://github.com/sobimibos","followers_url":"https://api.github.com/users/sobimibos/followers","following_url":"https://api.github.com/users/sobimibos/following{/other_user}","gists_url":"https://api.github.com/users/sobimibos/gists{/gist_id}","starred_url":"https://api.github.com/users/sobimibos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobimibos/subscriptions","organizations_url":"https://api.github.com/users/sobimibos/orgs","repos_url":"https://api.github.com/users/sobimibos/repos","events_url":"https://api.github.com/users/sobimibos/events{/privacy}","received_events_url":"https://api.github.com/users/sobimibos/received_events","type":"User","site_admin":false},"repo":{"id":106546304,"name":"smarthome","full_name":"sobimibos/smarthome","owner":{"login":"sobimibos","id":18039078,"avatar_url":"https://avatars1.githubusercontent.com/u/18039078?v=4","gravatar_id":"","url":"https://api.github.com/users/sobimibos","html_url":"https://github.com/sobimibos","followers_url":"https://api.github.com/users/sobimibos/followers","following_url":"https://api.github.com/users/sobimibos/following{/other_user}","gists_url":"https://api.github.com/users/sobimibos/gists{/gist_id}","starred_url":"https://api.github.com/users/sobimibos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobimibos/subscriptions","organizations_url":"https://api.github.com/users/sobimibos/orgs","repos_url":"https://api.github.com/users/sobimibos/repos","events_url":"https://api.github.com/users/sobimibos/events{/privacy}","received_events_url":"https://api.github.com/users/sobimibos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sobimibos/smarthome","description":"Eclipse SmartHome™ project","fork":true,"url":"https://api.github.com/repos/sobimibos/smarthome","forks_url":"https://api.github.com/repos/sobimibos/smarthome/forks","keys_url":"https://api.github.com/repos/sobimibos/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sobimibos/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sobimibos/smarthome/teams","hooks_url":"https://api.github.com/repos/sobimibos/smarthome/hooks","issue_events_url":"https://api.github.com/repos/sobimibos/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/sobimibos/smarthome/events","assignees_url":"https://api.github.com/repos/sobimibos/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/sobimibos/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/sobimibos/smarthome/tags","blobs_url":"https://api.github.com/repos/sobimibos/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sobimibos/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sobimibos/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/sobimibos/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sobimibos/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/sobimibos/smarthome/languages","stargazers_url":"https://api.github.com/repos/sobimibos/smarthome/stargazers","contributors_url":"https://api.github.com/repos/sobimibos/smarthome/contributors","subscribers_url":"https://api.github.com/repos/sobimibos/smarthome/subscribers","subscription_url":"https://api.github.com/repos/sobimibos/smarthome/subscription","commits_url":"https://api.github.com/repos/sobimibos/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/sobimibos/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/sobimibos/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/sobimibos/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/sobimibos/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/sobimibos/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sobimibos/smarthome/merges","archive_url":"https://api.github.com/repos/sobimibos/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sobimibos/smarthome/downloads","issues_url":"https://api.github.com/repos/sobimibos/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/sobimibos/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/sobimibos/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/sobimibos/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sobimibos/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/sobimibos/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/sobimibos/smarthome/deployments","created_at":"2017-10-11T11:38:28Z","updated_at":"2017-10-11T11:38:41Z","pushed_at":"2018-02-16T18:05:40Z","git_url":"git://github.com/sobimibos/smarthome.git","ssh_url":"git@github.com:sobimibos/smarthome.git","clone_url":"https://github.com/sobimibos/smarthome.git","svn_url":"https://github.com/sobimibos/smarthome","homepage":"https://www.eclipse.org/smarthome/","size":43994,"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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"9829331107f28fead670b741bce912b51d78a070","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-02-16T17:20:01Z","pushed_at":"2018-02-16T18:05:41Z","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":49241,"stargazers_count":644,"watchers_count":644,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":631,"mirror_url":null,"archived":false,"open_issues_count":397,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":631,"open_issues":397,"watchers":644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/5079"},"html":{"href":"https://github.com/eclipse/smarthome/pull/5079"},"issue":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/5079"},"comments":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/5079/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/5079/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/5079/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/smarthome/statuses/aec6045ed4d5c2ab5d28d62955a0afc11cefdd1d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"amitjoy"}}