{"action":"created","comment":{"url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/comments/102525360","pull_request_review_id":23283694,"id":102525360,"diff_hunk":"@@ -0,0 +1,178 @@\n+/*\n+ * Copyright 2017, TeamDev Ltd. All rights reserved.\n+ *\n+ * Redistribution and use in source and/or binary forms, with or without\n+ * modification, must retain the above copyright notice and the following\n+ * disclaimer.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+package org.spine3.helloworld;\n+\n+import com.google.common.base.Suppliers;\n+import com.google.protobuf.StringValue;\n+import com.google.protobuf.TextFormat;\n+import io.grpc.stub.StreamObserver;\n+import org.spine3.base.Command;\n+import org.spine3.base.Response;\n+import org.spine3.client.CommandFactory;\n+import org.spine3.helloworld.commands.IntroduceMyself;\n+import org.spine3.helloworld.events.UserIntroduced;\n+import org.spine3.server.BoundedContext;\n+import org.spine3.server.aggregate.Aggregate;\n+import org.spine3.server.aggregate.AggregateRepository;\n+import org.spine3.server.aggregate.Apply;\n+import org.spine3.server.command.Assign;\n+import org.spine3.server.event.EventSubscriber;\n+import org.spine3.server.event.Subscribe;\n+import org.spine3.server.storage.StorageFactory;\n+import org.spine3.server.storage.memory.InMemoryStorageFactory;\n+import org.spine3.time.ZoneOffsets;\n+import org.spine3.users.UserId;\n+\n+/**\n+ * A simple \"Hello, World!\" sample on top of Spine.\n+ *\n+ * @author Dmytro Grankin\n+ */\n+public class HelloWorldApp {\n+\n+    private static final StorageFactory storageFactory = InMemoryStorageFactory.getInstance();\n+    private static final BoundedContext boundedContext = newBoundedContext();\n+\n+    public static void main(String[] args) {\n+        final IntroduceMyself commandMessage = newIntroduceWorld();\n+        final Command command = newCommandFactory().create(commandMessage);\n+\n+        boundedContext.getCommandBus()\n+                      .post(command, new StreamObserver<Response>() {\n+                          @Override\n+                          public void onNext(Response value) {\n+                              System.out.println(\"Command posted \" + TextFormat.shortDebugString(value));\n+                          }\n+\n+                          @Override\n+                          public void onError(Throwable t) {\n+                              t.printStackTrace();","path":"hello-world/src/main/java/org/spine3/helloworld/HelloWorldApp.java","position":null,"original_position":67,"commit_id":"1c90a6cd1e4d1076429cd0571a780ab406d6442c","original_commit_id":"fa467f04550aba2f2954d9cc63bdd1af0a1ae836","user":{"login":"dmytro-grankin","id":25301769,"avatar_url":"https://avatars.githubusercontent.com/u/25301769?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-grankin","html_url":"https://github.com/dmytro-grankin","followers_url":"https://api.github.com/users/dmytro-grankin/followers","following_url":"https://api.github.com/users/dmytro-grankin/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-grankin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-grankin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-grankin/subscriptions","organizations_url":"https://api.github.com/users/dmytro-grankin/orgs","repos_url":"https://api.github.com/users/dmytro-grankin/repos","events_url":"https://api.github.com/users/dmytro-grankin/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-grankin/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2017-02-22T17:41:35Z","updated_at":"2017-02-22T17:41:35Z","html_url":"https://github.com/SpineEventEngine/examples-java/pull/6#discussion_r102525360","pull_request_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/comments/102525360"},"html":{"href":"https://github.com/SpineEventEngine/examples-java/pull/6#discussion_r102525360"},"pull_request":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6","id":105408343,"html_url":"https://github.com/SpineEventEngine/examples-java/pull/6","diff_url":"https://github.com/SpineEventEngine/examples-java/pull/6.diff","patch_url":"https://github.com/SpineEventEngine/examples-java/pull/6.patch","issue_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/6","number":6,"state":"open","locked":false,"title":"Hello world","user":{"login":"dmytro-grankin","id":25301769,"avatar_url":"https://avatars.githubusercontent.com/u/25301769?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-grankin","html_url":"https://github.com/dmytro-grankin","followers_url":"https://api.github.com/users/dmytro-grankin/followers","following_url":"https://api.github.com/users/dmytro-grankin/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-grankin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-grankin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-grankin/subscriptions","organizations_url":"https://api.github.com/users/dmytro-grankin/orgs","repos_url":"https://api.github.com/users/dmytro-grankin/repos","events_url":"https://api.github.com/users/dmytro-grankin/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-grankin/received_events","type":"User","site_admin":false},"body":"Create separate module, that demonstrates how to write `Hello, World` app using `BoundedContext`.","created_at":"2017-02-09T11:27:23Z","updated_at":"2017-02-22T17:41:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9c6447a51935ba018e69059ca3395a8e7a4c0b4","assignee":{"login":"dmytro-grankin","id":25301769,"avatar_url":"https://avatars.githubusercontent.com/u/25301769?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-grankin","html_url":"https://github.com/dmytro-grankin","followers_url":"https://api.github.com/users/dmytro-grankin/followers","following_url":"https://api.github.com/users/dmytro-grankin/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-grankin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-grankin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-grankin/subscriptions","organizations_url":"https://api.github.com/users/dmytro-grankin/orgs","repos_url":"https://api.github.com/users/dmytro-grankin/repos","events_url":"https://api.github.com/users/dmytro-grankin/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-grankin/received_events","type":"User","site_admin":false},"assignees":[{"login":"dmytro-grankin","id":25301769,"avatar_url":"https://avatars.githubusercontent.com/u/25301769?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-grankin","html_url":"https://github.com/dmytro-grankin","followers_url":"https://api.github.com/users/dmytro-grankin/followers","following_url":"https://api.github.com/users/dmytro-grankin/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-grankin/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-grankin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-grankin/subscriptions","organizations_url":"https://api.github.com/users/dmytro-grankin/orgs","repos_url":"https://api.github.com/users/dmytro-grankin/repos","events_url":"https://api.github.com/users/dmytro-grankin/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-grankin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6/commits","review_comments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6/comments","review_comment_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/6/comments","statuses_url":"https://api.github.com/repos/SpineEventEngine/examples-java/statuses/1c90a6cd1e4d1076429cd0571a780ab406d6442c","head":{"label":"SpineEventEngine:hello-world","ref":"hello-world","sha":"1c90a6cd1e4d1076429cd0571a780ab406d6442c","user":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":65474400,"name":"examples-java","full_name":"SpineEventEngine/examples-java","owner":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpineEventEngine/examples-java","description":"Examples of using the framework from Java","fork":false,"url":"https://api.github.com/repos/SpineEventEngine/examples-java","forks_url":"https://api.github.com/repos/SpineEventEngine/examples-java/forks","keys_url":"https://api.github.com/repos/SpineEventEngine/examples-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpineEventEngine/examples-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpineEventEngine/examples-java/teams","hooks_url":"https://api.github.com/repos/SpineEventEngine/examples-java/hooks","issue_events_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/events{/number}","events_url":"https://api.github.com/repos/SpineEventEngine/examples-java/events","assignees_url":"https://api.github.com/repos/SpineEventEngine/examples-java/assignees{/user}","branches_url":"https://api.github.com/repos/SpineEventEngine/examples-java/branches{/branch}","tags_url":"https://api.github.com/repos/SpineEventEngine/examples-java/tags","blobs_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpineEventEngine/examples-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SpineEventEngine/examples-java/languages","stargazers_url":"https://api.github.com/repos/SpineEventEngine/examples-java/stargazers","contributors_url":"https://api.github.com/repos/SpineEventEngine/examples-java/contributors","subscribers_url":"https://api.github.com/repos/SpineEventEngine/examples-java/subscribers","subscription_url":"https://api.github.com/repos/SpineEventEngine/examples-java/subscription","commits_url":"https://api.github.com/repos/SpineEventEngine/examples-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpineEventEngine/examples-java/contents/{+path}","compare_url":"https://api.github.com/repos/SpineEventEngine/examples-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpineEventEngine/examples-java/merges","archive_url":"https://api.github.com/repos/SpineEventEngine/examples-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpineEventEngine/examples-java/downloads","issues_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues{/number}","pulls_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SpineEventEngine/examples-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SpineEventEngine/examples-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpineEventEngine/examples-java/labels{/name}","releases_url":"https://api.github.com/repos/SpineEventEngine/examples-java/releases{/id}","deployments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/deployments","created_at":"2016-08-11T14:06:24Z","updated_at":"2016-11-03T13:36:20Z","pushed_at":"2017-02-22T17:41:18Z","git_url":"git://github.com/SpineEventEngine/examples-java.git","ssh_url":"git@github.com:SpineEventEngine/examples-java.git","clone_url":"https://github.com/SpineEventEngine/examples-java.git","svn_url":"https://github.com/SpineEventEngine/examples-java","homepage":null,"size":152,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"SpineEventEngine:spine_0.8.0-update","ref":"spine_0.8.0-update","sha":"de704941c9cc70cb9bb5f54ace63bfa4290e3b5b","user":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":65474400,"name":"examples-java","full_name":"SpineEventEngine/examples-java","owner":{"login":"SpineEventEngine","id":12821626,"avatar_url":"https://avatars.githubusercontent.com/u/12821626?v=3","gravatar_id":"","url":"https://api.github.com/users/SpineEventEngine","html_url":"https://github.com/SpineEventEngine","followers_url":"https://api.github.com/users/SpineEventEngine/followers","following_url":"https://api.github.com/users/SpineEventEngine/following{/other_user}","gists_url":"https://api.github.com/users/SpineEventEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/SpineEventEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpineEventEngine/subscriptions","organizations_url":"https://api.github.com/users/SpineEventEngine/orgs","repos_url":"https://api.github.com/users/SpineEventEngine/repos","events_url":"https://api.github.com/users/SpineEventEngine/events{/privacy}","received_events_url":"https://api.github.com/users/SpineEventEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpineEventEngine/examples-java","description":"Examples of using the framework from Java","fork":false,"url":"https://api.github.com/repos/SpineEventEngine/examples-java","forks_url":"https://api.github.com/repos/SpineEventEngine/examples-java/forks","keys_url":"https://api.github.com/repos/SpineEventEngine/examples-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpineEventEngine/examples-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpineEventEngine/examples-java/teams","hooks_url":"https://api.github.com/repos/SpineEventEngine/examples-java/hooks","issue_events_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/events{/number}","events_url":"https://api.github.com/repos/SpineEventEngine/examples-java/events","assignees_url":"https://api.github.com/repos/SpineEventEngine/examples-java/assignees{/user}","branches_url":"https://api.github.com/repos/SpineEventEngine/examples-java/branches{/branch}","tags_url":"https://api.github.com/repos/SpineEventEngine/examples-java/tags","blobs_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpineEventEngine/examples-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SpineEventEngine/examples-java/languages","stargazers_url":"https://api.github.com/repos/SpineEventEngine/examples-java/stargazers","contributors_url":"https://api.github.com/repos/SpineEventEngine/examples-java/contributors","subscribers_url":"https://api.github.com/repos/SpineEventEngine/examples-java/subscribers","subscription_url":"https://api.github.com/repos/SpineEventEngine/examples-java/subscription","commits_url":"https://api.github.com/repos/SpineEventEngine/examples-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpineEventEngine/examples-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpineEventEngine/examples-java/contents/{+path}","compare_url":"https://api.github.com/repos/SpineEventEngine/examples-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpineEventEngine/examples-java/merges","archive_url":"https://api.github.com/repos/SpineEventEngine/examples-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpineEventEngine/examples-java/downloads","issues_url":"https://api.github.com/repos/SpineEventEngine/examples-java/issues{/number}","pulls_url":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SpineEventEngine/examples-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SpineEventEngine/examples-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpineEventEngine/examples-java/labels{/name}","releases_url":"https://api.github.com/repos/SpineEventEngine/examples-java/releases{/id}","deployments_url":"https://api.github.com/repos/SpineEventEngine/examples-java/deployments","created_at":"2016-08-11T14:06:24Z","updated_at":"2016-11-03T13:36:20Z","pushed_at":"2017-02-22T17:41:18Z","git_url":"git://github.com/SpineEventEngine/examples-java.git","ssh_url":"git@github.com:SpineEventEngine/examples-java.git","clone_url":"https://github.com/SpineEventEngine/examples-java.git","svn_url":"https://github.com/SpineEventEngine/examples-java","homepage":null,"size":152,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6"},"html":{"href":"https://github.com/SpineEventEngine/examples-java/pull/6"},"issue":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/6"},"comments":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/SpineEventEngine/examples-java/statuses/1c90a6cd1e4d1076429cd0571a780ab406d6442c"}}}}
{"actor":{"display_login":"dmytro-grankin"}}