{"action":"created","comment":{"url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/comments/42325262","id":42325262,"diff_hunk":"@@ -0,0 +1,25 @@\n+package io.pathfinder.config\n+\n+import akka.actor.ActorSystem\n+import io.pathfinder.routing.Router\n+import play.api.GlobalSettings\n+import play.api.Application\n+import play.Logger\n+\n+/**\n+ * These hooks are called by Play Framework. We can use them to initialize expensive objects and\n+ * set up any communication channels.\n+ */\n+object Global extends GlobalSettings {\n+\n+    val actorSystem = ActorSystem.create()\n+\n+    override def onStart(app: Application) {\n+        Logger.info(\"Application has started.\")\n+        Router.init()","path":"app/io/pathfinder/config/Global.scala","position":19,"original_position":19,"commit_id":"b583e71b1a0c855b7de549bb5463885c9d4b9df6","original_commit_id":"b583e71b1a0c855b7de549bb5463885c9d4b9df6","user":{"login":"aj-michael","id":7756476,"avatar_url":"https://avatars.githubusercontent.com/u/7756476?v=3","gravatar_id":"","url":"https://api.github.com/users/aj-michael","html_url":"https://github.com/aj-michael","followers_url":"https://api.github.com/users/aj-michael/followers","following_url":"https://api.github.com/users/aj-michael/following{/other_user}","gists_url":"https://api.github.com/users/aj-michael/gists{/gist_id}","starred_url":"https://api.github.com/users/aj-michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aj-michael/subscriptions","organizations_url":"https://api.github.com/users/aj-michael/orgs","repos_url":"https://api.github.com/users/aj-michael/repos","events_url":"https://api.github.com/users/aj-michael/events{/privacy}","received_events_url":"https://api.github.com/users/aj-michael/received_events","type":"User","site_admin":false},"body":"You can get rid of the `init()` part now. Just use `Router`. Java forces you to use a function.","created_at":"2015-10-18T19:42:10Z","updated_at":"2015-10-18T19:42:10Z","html_url":"https://github.com/CSSE497/pathfinder-server/pull/39#discussion_r42325262","pull_request_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/comments/42325262"},"html":{"href":"https://github.com/CSSE497/pathfinder-server/pull/39#discussion_r42325262"},"pull_request":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39","id":48015618,"html_url":"https://github.com/CSSE497/pathfinder-server/pull/39","diff_url":"https://github.com/CSSE497/pathfinder-server/pull/39.diff","patch_url":"https://github.com/CSSE497/pathfinder-server/pull/39.patch","issue_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/39","number":39,"state":"open","locked":false,"title":"Feature/more pushes","user":{"login":"danhanson","id":8070751,"avatar_url":"https://avatars.githubusercontent.com/u/8070751?v=3","gravatar_id":"","url":"https://api.github.com/users/danhanson","html_url":"https://github.com/danhanson","followers_url":"https://api.github.com/users/danhanson/followers","following_url":"https://api.github.com/users/danhanson/following{/other_user}","gists_url":"https://api.github.com/users/danhanson/gists{/gist_id}","starred_url":"https://api.github.com/users/danhanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danhanson/subscriptions","organizations_url":"https://api.github.com/users/danhanson/orgs","repos_url":"https://api.github.com/users/danhanson/repos","events_url":"https://api.github.com/users/danhanson/events{/privacy}","received_events_url":"https://api.github.com/users/danhanson/received_events","type":"User","site_admin":false},"body":"Subscribe to vehicles by id:\r\n```\r\n{ \"subscribe\": { \"model\":\"Vehicle\", \"id\":3 } }\r\n```\r\nSubscribe to commodities by cluster\r\n```\r\n{ \"subscribe\": { \"model\":\"Commodity\", \"clusterId\":6 } }\r\n```\r\nAfter subscribing, the subscribed socket will receive Created/Updated/Deleted notifications for the models they have subscribed to","created_at":"2015-10-18T19:31:20Z","updated_at":"2015-10-18T19:42:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f8c7e5c73e398e870e6345c21628a28cfad0b0b","assignee":{"login":"aj-michael","id":7756476,"avatar_url":"https://avatars.githubusercontent.com/u/7756476?v=3","gravatar_id":"","url":"https://api.github.com/users/aj-michael","html_url":"https://github.com/aj-michael","followers_url":"https://api.github.com/users/aj-michael/followers","following_url":"https://api.github.com/users/aj-michael/following{/other_user}","gists_url":"https://api.github.com/users/aj-michael/gists{/gist_id}","starred_url":"https://api.github.com/users/aj-michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aj-michael/subscriptions","organizations_url":"https://api.github.com/users/aj-michael/orgs","repos_url":"https://api.github.com/users/aj-michael/repos","events_url":"https://api.github.com/users/aj-michael/events{/privacy}","received_events_url":"https://api.github.com/users/aj-michael/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CSSE497/pathfinder-server/milestones/3","html_url":"https://github.com/CSSE497/pathfinder-server/milestones/Sprint%205%20(10/14%20-%2010/20)","labels_url":"https://api.github.com/repos/CSSE497/pathfinder-server/milestones/3/labels","id":1351802,"number":3,"title":"Sprint 5 (10/14 - 10/20)","description":"","creator":{"login":"danhanson","id":8070751,"avatar_url":"https://avatars.githubusercontent.com/u/8070751?v=3","gravatar_id":"","url":"https://api.github.com/users/danhanson","html_url":"https://github.com/danhanson","followers_url":"https://api.github.com/users/danhanson/followers","following_url":"https://api.github.com/users/danhanson/following{/other_user}","gists_url":"https://api.github.com/users/danhanson/gists{/gist_id}","starred_url":"https://api.github.com/users/danhanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danhanson/subscriptions","organizations_url":"https://api.github.com/users/danhanson/orgs","repos_url":"https://api.github.com/users/danhanson/repos","events_url":"https://api.github.com/users/danhanson/events{/privacy}","received_events_url":"https://api.github.com/users/danhanson/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-10-12T21:18:21Z","updated_at":"2015-10-18T19:31:28Z","due_on":"2015-10-20T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39/commits","review_comments_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39/comments","review_comment_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/39/comments","statuses_url":"https://api.github.com/repos/CSSE497/pathfinder-server/statuses/b583e71b1a0c855b7de549bb5463885c9d4b9df6","head":{"label":"CSSE497:feature/more-pushes","ref":"feature/more-pushes","sha":"b583e71b1a0c855b7de549bb5463885c9d4b9df6","user":{"login":"CSSE497","id":14083993,"avatar_url":"https://avatars.githubusercontent.com/u/14083993?v=3","gravatar_id":"","url":"https://api.github.com/users/CSSE497","html_url":"https://github.com/CSSE497","followers_url":"https://api.github.com/users/CSSE497/followers","following_url":"https://api.github.com/users/CSSE497/following{/other_user}","gists_url":"https://api.github.com/users/CSSE497/gists{/gist_id}","starred_url":"https://api.github.com/users/CSSE497/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSSE497/subscriptions","organizations_url":"https://api.github.com/users/CSSE497/orgs","repos_url":"https://api.github.com/users/CSSE497/repos","events_url":"https://api.github.com/users/CSSE497/events{/privacy}","received_events_url":"https://api.github.com/users/CSSE497/received_events","type":"Organization","site_admin":false},"repo":{"id":41896390,"name":"pathfinder-server","full_name":"CSSE497/pathfinder-server","owner":{"login":"CSSE497","id":14083993,"avatar_url":"https://avatars.githubusercontent.com/u/14083993?v=3","gravatar_id":"","url":"https://api.github.com/users/CSSE497","html_url":"https://github.com/CSSE497","followers_url":"https://api.github.com/users/CSSE497/followers","following_url":"https://api.github.com/users/CSSE497/following{/other_user}","gists_url":"https://api.github.com/users/CSSE497/gists{/gist_id}","starred_url":"https://api.github.com/users/CSSE497/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSSE497/subscriptions","organizations_url":"https://api.github.com/users/CSSE497/orgs","repos_url":"https://api.github.com/users/CSSE497/repos","events_url":"https://api.github.com/users/CSSE497/events{/privacy}","received_events_url":"https://api.github.com/users/CSSE497/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CSSE497/pathfinder-server","description":"The backend for the Pathfinder service.","fork":false,"url":"https://api.github.com/repos/CSSE497/pathfinder-server","forks_url":"https://api.github.com/repos/CSSE497/pathfinder-server/forks","keys_url":"https://api.github.com/repos/CSSE497/pathfinder-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CSSE497/pathfinder-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CSSE497/pathfinder-server/teams","hooks_url":"https://api.github.com/repos/CSSE497/pathfinder-server/hooks","issue_events_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/events{/number}","events_url":"https://api.github.com/repos/CSSE497/pathfinder-server/events","assignees_url":"https://api.github.com/repos/CSSE497/pathfinder-server/assignees{/user}","branches_url":"https://api.github.com/repos/CSSE497/pathfinder-server/branches{/branch}","tags_url":"https://api.github.com/repos/CSSE497/pathfinder-server/tags","blobs_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CSSE497/pathfinder-server/statuses/{sha}","languages_url":"https://api.github.com/repos/CSSE497/pathfinder-server/languages","stargazers_url":"https://api.github.com/repos/CSSE497/pathfinder-server/stargazers","contributors_url":"https://api.github.com/repos/CSSE497/pathfinder-server/contributors","subscribers_url":"https://api.github.com/repos/CSSE497/pathfinder-server/subscribers","subscription_url":"https://api.github.com/repos/CSSE497/pathfinder-server/subscription","commits_url":"https://api.github.com/repos/CSSE497/pathfinder-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/CSSE497/pathfinder-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/CSSE497/pathfinder-server/contents/{+path}","compare_url":"https://api.github.com/repos/CSSE497/pathfinder-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CSSE497/pathfinder-server/merges","archive_url":"https://api.github.com/repos/CSSE497/pathfinder-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CSSE497/pathfinder-server/downloads","issues_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues{/number}","pulls_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls{/number}","milestones_url":"https://api.github.com/repos/CSSE497/pathfinder-server/milestones{/number}","notifications_url":"https://api.github.com/repos/CSSE497/pathfinder-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CSSE497/pathfinder-server/labels{/name}","releases_url":"https://api.github.com/repos/CSSE497/pathfinder-server/releases{/id}","created_at":"2015-09-04T03:41:00Z","updated_at":"2015-10-03T03:46:54Z","pushed_at":"2015-10-18T19:31:20Z","git_url":"git://github.com/CSSE497/pathfinder-server.git","ssh_url":"git@github.com:CSSE497/pathfinder-server.git","clone_url":"https://github.com/CSSE497/pathfinder-server.git","svn_url":"https://github.com/CSSE497/pathfinder-server","homepage":"","size":1152,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"dev"}},"base":{"label":"CSSE497:dev","ref":"dev","sha":"0c6fe831f85a4997e8b9fc81155cd9e67b2606b7","user":{"login":"CSSE497","id":14083993,"avatar_url":"https://avatars.githubusercontent.com/u/14083993?v=3","gravatar_id":"","url":"https://api.github.com/users/CSSE497","html_url":"https://github.com/CSSE497","followers_url":"https://api.github.com/users/CSSE497/followers","following_url":"https://api.github.com/users/CSSE497/following{/other_user}","gists_url":"https://api.github.com/users/CSSE497/gists{/gist_id}","starred_url":"https://api.github.com/users/CSSE497/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSSE497/subscriptions","organizations_url":"https://api.github.com/users/CSSE497/orgs","repos_url":"https://api.github.com/users/CSSE497/repos","events_url":"https://api.github.com/users/CSSE497/events{/privacy}","received_events_url":"https://api.github.com/users/CSSE497/received_events","type":"Organization","site_admin":false},"repo":{"id":41896390,"name":"pathfinder-server","full_name":"CSSE497/pathfinder-server","owner":{"login":"CSSE497","id":14083993,"avatar_url":"https://avatars.githubusercontent.com/u/14083993?v=3","gravatar_id":"","url":"https://api.github.com/users/CSSE497","html_url":"https://github.com/CSSE497","followers_url":"https://api.github.com/users/CSSE497/followers","following_url":"https://api.github.com/users/CSSE497/following{/other_user}","gists_url":"https://api.github.com/users/CSSE497/gists{/gist_id}","starred_url":"https://api.github.com/users/CSSE497/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSSE497/subscriptions","organizations_url":"https://api.github.com/users/CSSE497/orgs","repos_url":"https://api.github.com/users/CSSE497/repos","events_url":"https://api.github.com/users/CSSE497/events{/privacy}","received_events_url":"https://api.github.com/users/CSSE497/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CSSE497/pathfinder-server","description":"The backend for the Pathfinder service.","fork":false,"url":"https://api.github.com/repos/CSSE497/pathfinder-server","forks_url":"https://api.github.com/repos/CSSE497/pathfinder-server/forks","keys_url":"https://api.github.com/repos/CSSE497/pathfinder-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CSSE497/pathfinder-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CSSE497/pathfinder-server/teams","hooks_url":"https://api.github.com/repos/CSSE497/pathfinder-server/hooks","issue_events_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/events{/number}","events_url":"https://api.github.com/repos/CSSE497/pathfinder-server/events","assignees_url":"https://api.github.com/repos/CSSE497/pathfinder-server/assignees{/user}","branches_url":"https://api.github.com/repos/CSSE497/pathfinder-server/branches{/branch}","tags_url":"https://api.github.com/repos/CSSE497/pathfinder-server/tags","blobs_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CSSE497/pathfinder-server/statuses/{sha}","languages_url":"https://api.github.com/repos/CSSE497/pathfinder-server/languages","stargazers_url":"https://api.github.com/repos/CSSE497/pathfinder-server/stargazers","contributors_url":"https://api.github.com/repos/CSSE497/pathfinder-server/contributors","subscribers_url":"https://api.github.com/repos/CSSE497/pathfinder-server/subscribers","subscription_url":"https://api.github.com/repos/CSSE497/pathfinder-server/subscription","commits_url":"https://api.github.com/repos/CSSE497/pathfinder-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/CSSE497/pathfinder-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/CSSE497/pathfinder-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/CSSE497/pathfinder-server/contents/{+path}","compare_url":"https://api.github.com/repos/CSSE497/pathfinder-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CSSE497/pathfinder-server/merges","archive_url":"https://api.github.com/repos/CSSE497/pathfinder-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CSSE497/pathfinder-server/downloads","issues_url":"https://api.github.com/repos/CSSE497/pathfinder-server/issues{/number}","pulls_url":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls{/number}","milestones_url":"https://api.github.com/repos/CSSE497/pathfinder-server/milestones{/number}","notifications_url":"https://api.github.com/repos/CSSE497/pathfinder-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CSSE497/pathfinder-server/labels{/name}","releases_url":"https://api.github.com/repos/CSSE497/pathfinder-server/releases{/id}","created_at":"2015-09-04T03:41:00Z","updated_at":"2015-10-03T03:46:54Z","pushed_at":"2015-10-18T19:31:20Z","git_url":"git://github.com/CSSE497/pathfinder-server.git","ssh_url":"git@github.com:CSSE497/pathfinder-server.git","clone_url":"https://github.com/CSSE497/pathfinder-server.git","svn_url":"https://github.com/CSSE497/pathfinder-server","homepage":"","size":1152,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39"},"html":{"href":"https://github.com/CSSE497/pathfinder-server/pull/39"},"issue":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/39"},"comments":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/CSSE497/pathfinder-server/statuses/b583e71b1a0c855b7de549bb5463885c9d4b9df6"}}}}