{"action":"created","comment":{"url":"https://api.github.com/repos/line/armeria/pulls/comments/77462766","id":77462766,"diff_hunk":"@@ -0,0 +1,75 @@\n+/*\n+ * Copyright 2016 LINE Corporation\n+ *\n+ * LINE Corporation licenses this file to you under the Apache License,\n+ * version 2.0 (the \"License\"); you may not use this file except in compliance\n+ * with the License. You may obtain a copy of the License at:\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package com.linecorp.armeria.server;\n+\n+import static java.util.Objects.requireNonNull;\n+\n+/**\n+ * Build a new {@link VirtualHost}.","path":"src/main/java/com/linecorp/armeria/server/ChainedVirtualHostBuilder.java","position":22,"original_position":22,"commit_id":"83fab261ae6507f9146386cb4f4ef1d33ce45bba","original_commit_id":"83fab261ae6507f9146386cb4f4ef1d33ce45bba","user":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"body":"- Build -> Builds","created_at":"2016-09-05T01:18:03Z","updated_at":"2016-09-05T01:18:03Z","html_url":"https://github.com/line/armeria/pull/254#discussion_r77462766","pull_request_url":"https://api.github.com/repos/line/armeria/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/comments/77462766"},"html":{"href":"https://github.com/line/armeria/pull/254#discussion_r77462766"},"pull_request":{"href":"https://api.github.com/repos/line/armeria/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/line/armeria/pulls/254","id":83293684,"html_url":"https://github.com/line/armeria/pull/254","diff_url":"https://github.com/line/armeria/pull/254.diff","patch_url":"https://github.com/line/armeria/pull/254.patch","issue_url":"https://api.github.com/repos/line/armeria/issues/254","number":254,"state":"open","locked":false,"title":"proposal: Explicitly inform the defaultVirtualHost setting","user":{"login":"adrenalinee","id":1064338,"avatar_url":"https://avatars.githubusercontent.com/u/1064338?v=3","gravatar_id":"","url":"https://api.github.com/users/adrenalinee","html_url":"https://github.com/adrenalinee","followers_url":"https://api.github.com/users/adrenalinee/followers","following_url":"https://api.github.com/users/adrenalinee/following{/other_user}","gists_url":"https://api.github.com/users/adrenalinee/gists{/gist_id}","starred_url":"https://api.github.com/users/adrenalinee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrenalinee/subscriptions","organizations_url":"https://api.github.com/users/adrenalinee/orgs","repos_url":"https://api.github.com/users/adrenalinee/repos","events_url":"https://api.github.com/users/adrenalinee/events{/privacy}","received_events_url":"https://api.github.com/users/adrenalinee/received_events","type":"User","site_admin":false},"body":"**Motivation**\r\nSetting of defaultVirtualHost and virtualHost will propose a method to be processed at the same level in serverBuilder.\r\n\r\n**Modifications**\r\nmodified class:\r\n\r\n- ServerBulder - add method for configure to build default virtual host\r\n- VirtualHostBuilder - add constructor for contain ServerBuilder, add method for return ServerBuilder\r\n\r\n**Result**\r\nI think that looks more fluent.\r\nProceed as follows\r\n\r\n```\r\nServerBuilder sb = new ServerBuilder();\r\nServer server =\r\n     sb.port(8080, SessionProtocol.HTTP) // Add a port to listen\r\n     .withDefaultVirtualHost() // Add services to the default virtual host.\r\n         .serviceAt(...)\r\n         .serviceUnder(...)\r\n     .and().withVirtualHost(\"*.foo.com\") // Add a virtual host.\r\n         .serviceAt(...)\r\n         .serviceUnder(...)\r\n     .and().build(); // Build\r\n```\r\n\r\n**etc**\r\nmodified file:\r\nsrc/site/sphinx/client-basics.rst: add the missing character","created_at":"2016-08-30T15:29:30Z","updated_at":"2016-09-05T01:18:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbaebc00482af21f81dff6d10389ad7981f3f31a","assignee":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"assignees":[{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/line/armeria/milestones/44","html_url":"https://github.com/line/armeria/milestones/0.25.0.Final","labels_url":"https://api.github.com/repos/line/armeria/milestones/44/labels","id":1964576,"number":44,"title":"0.25.0.Final","description":null,"creator":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2016-08-26T08:11:25Z","updated_at":"2016-09-02T08:40:34Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/line/armeria/pulls/254/commits","review_comments_url":"https://api.github.com/repos/line/armeria/pulls/254/comments","review_comment_url":"https://api.github.com/repos/line/armeria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/line/armeria/issues/254/comments","statuses_url":"https://api.github.com/repos/line/armeria/statuses/83fab261ae6507f9146386cb4f4ef1d33ce45bba","head":{"label":"adrenalinee:master","ref":"master","sha":"83fab261ae6507f9146386cb4f4ef1d33ce45bba","user":{"login":"adrenalinee","id":1064338,"avatar_url":"https://avatars.githubusercontent.com/u/1064338?v=3","gravatar_id":"","url":"https://api.github.com/users/adrenalinee","html_url":"https://github.com/adrenalinee","followers_url":"https://api.github.com/users/adrenalinee/followers","following_url":"https://api.github.com/users/adrenalinee/following{/other_user}","gists_url":"https://api.github.com/users/adrenalinee/gists{/gist_id}","starred_url":"https://api.github.com/users/adrenalinee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrenalinee/subscriptions","organizations_url":"https://api.github.com/users/adrenalinee/orgs","repos_url":"https://api.github.com/users/adrenalinee/repos","events_url":"https://api.github.com/users/adrenalinee/events{/privacy}","received_events_url":"https://api.github.com/users/adrenalinee/received_events","type":"User","site_admin":false},"repo":{"id":66800702,"name":"armeria","full_name":"adrenalinee/armeria","owner":{"login":"adrenalinee","id":1064338,"avatar_url":"https://avatars.githubusercontent.com/u/1064338?v=3","gravatar_id":"","url":"https://api.github.com/users/adrenalinee","html_url":"https://github.com/adrenalinee","followers_url":"https://api.github.com/users/adrenalinee/followers","following_url":"https://api.github.com/users/adrenalinee/following{/other_user}","gists_url":"https://api.github.com/users/adrenalinee/gists{/gist_id}","starred_url":"https://api.github.com/users/adrenalinee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrenalinee/subscriptions","organizations_url":"https://api.github.com/users/adrenalinee/orgs","repos_url":"https://api.github.com/users/adrenalinee/repos","events_url":"https://api.github.com/users/adrenalinee/events{/privacy}","received_events_url":"https://api.github.com/users/adrenalinee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrenalinee/armeria","description":"Asynchronous RPC/API client/server library built on top of Java 8, Netty 4.1, HTTP/2, and Thrift","fork":true,"url":"https://api.github.com/repos/adrenalinee/armeria","forks_url":"https://api.github.com/repos/adrenalinee/armeria/forks","keys_url":"https://api.github.com/repos/adrenalinee/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrenalinee/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrenalinee/armeria/teams","hooks_url":"https://api.github.com/repos/adrenalinee/armeria/hooks","issue_events_url":"https://api.github.com/repos/adrenalinee/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/adrenalinee/armeria/events","assignees_url":"https://api.github.com/repos/adrenalinee/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/adrenalinee/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/adrenalinee/armeria/tags","blobs_url":"https://api.github.com/repos/adrenalinee/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrenalinee/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrenalinee/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrenalinee/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrenalinee/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/adrenalinee/armeria/languages","stargazers_url":"https://api.github.com/repos/adrenalinee/armeria/stargazers","contributors_url":"https://api.github.com/repos/adrenalinee/armeria/contributors","subscribers_url":"https://api.github.com/repos/adrenalinee/armeria/subscribers","subscription_url":"https://api.github.com/repos/adrenalinee/armeria/subscription","commits_url":"https://api.github.com/repos/adrenalinee/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrenalinee/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrenalinee/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrenalinee/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrenalinee/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/adrenalinee/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrenalinee/armeria/merges","archive_url":"https://api.github.com/repos/adrenalinee/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrenalinee/armeria/downloads","issues_url":"https://api.github.com/repos/adrenalinee/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/adrenalinee/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/adrenalinee/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/adrenalinee/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrenalinee/armeria/labels{/name}","releases_url":"https://api.github.com/repos/adrenalinee/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/adrenalinee/armeria/deployments","created_at":"2016-08-29T01:23:41Z","updated_at":"2016-08-29T01:23:43Z","pushed_at":"2016-09-04T13:34:38Z","git_url":"git://github.com/adrenalinee/armeria.git","ssh_url":"git@github.com:adrenalinee/armeria.git","clone_url":"https://github.com/adrenalinee/armeria.git","svn_url":"https://github.com/adrenalinee/armeria","homepage":"http://line.github.io/armeria/","size":13036,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"line:master","ref":"master","sha":"643fa0639f9049a6fefeb100a877bad2bb5add70","user":{"login":"line","id":13128444,"avatar_url":"https://avatars.githubusercontent.com/u/13128444?v=3","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"repo":{"id":46251204,"name":"armeria","full_name":"line/armeria","owner":{"login":"line","id":13128444,"avatar_url":"https://avatars.githubusercontent.com/u/13128444?v=3","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/line/armeria","description":"Asynchronous RPC/API client/server library built on top of Java 8, Netty 4.1, HTTP/2, and Thrift","fork":false,"url":"https://api.github.com/repos/line/armeria","forks_url":"https://api.github.com/repos/line/armeria/forks","keys_url":"https://api.github.com/repos/line/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/line/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/line/armeria/teams","hooks_url":"https://api.github.com/repos/line/armeria/hooks","issue_events_url":"https://api.github.com/repos/line/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/line/armeria/events","assignees_url":"https://api.github.com/repos/line/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/line/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/line/armeria/tags","blobs_url":"https://api.github.com/repos/line/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/line/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/line/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/line/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/line/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/line/armeria/languages","stargazers_url":"https://api.github.com/repos/line/armeria/stargazers","contributors_url":"https://api.github.com/repos/line/armeria/contributors","subscribers_url":"https://api.github.com/repos/line/armeria/subscribers","subscription_url":"https://api.github.com/repos/line/armeria/subscription","commits_url":"https://api.github.com/repos/line/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/line/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/line/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/line/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/line/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/line/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/line/armeria/merges","archive_url":"https://api.github.com/repos/line/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/line/armeria/downloads","issues_url":"https://api.github.com/repos/line/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/line/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/line/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/line/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/line/armeria/labels{/name}","releases_url":"https://api.github.com/repos/line/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/line/armeria/deployments","created_at":"2015-11-16T04:04:01Z","updated_at":"2016-09-03T14:25:16Z","pushed_at":"2016-09-04T13:34:39Z","git_url":"git://github.com/line/armeria.git","ssh_url":"git@github.com:line/armeria.git","clone_url":"https://github.com/line/armeria.git","svn_url":"https://github.com/line/armeria","homepage":"http://line.github.io/armeria/","size":14585,"stargazers_count":494,"watchers_count":494,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":115,"mirror_url":null,"open_issues_count":39,"forks":115,"open_issues":39,"watchers":494,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/254"},"html":{"href":"https://github.com/line/armeria/pull/254"},"issue":{"href":"https://api.github.com/repos/line/armeria/issues/254"},"comments":{"href":"https://api.github.com/repos/line/armeria/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/line/armeria/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/line/armeria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/line/armeria/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/line/armeria/statuses/83fab261ae6507f9146386cb4f4ef1d33ce45bba"}}}}
{"actor":{"display_login":"trustin"}}