{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/californium/pulls/comments/59236484","id":59236484,"diff_hunk":"@@ -33,5 +33,12 @@\n \t * @param exchange the exchange\n \t */\n \tpublic void completed(Exchange exchange);\n-\t\n+\n+\t/**\n+\t * Invoked when a new correlation context is set.\n+\t * \n+\t * @param exchange the exchange\n+\t */\n+\tpublic void contextEstablised(Exchange exchange);","path":"californium-core/src/main/java/org/eclipse/californium/core/network/ExchangeObserver.java","position":11,"original_position":11,"commit_id":"04e3b3d59615f26c0b50cbf7a75ace54b99f801d","original_commit_id":"04e3b3d59615f26c0b50cbf7a75ace54b99f801d","user":{"login":"sbernard31","id":840294,"avatar_url":"https://avatars.githubusercontent.com/u/840294?v=3","gravatar_id":"","url":"https://api.github.com/users/sbernard31","html_url":"https://github.com/sbernard31","followers_url":"https://api.github.com/users/sbernard31/followers","following_url":"https://api.github.com/users/sbernard31/following{/other_user}","gists_url":"https://api.github.com/users/sbernard31/gists{/gist_id}","starred_url":"https://api.github.com/users/sbernard31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbernard31/subscriptions","organizations_url":"https://api.github.com/users/sbernard31/orgs","repos_url":"https://api.github.com/users/sbernard31/repos","events_url":"https://api.github.com/users/sbernard31/events{/privacy}","received_events_url":"https://api.github.com/users/sbernard31/received_events","type":"User","site_admin":false},"body":"You guess right ;)","created_at":"2016-04-11T16:33:46Z","updated_at":"2016-04-11T16:33:46Z","html_url":"https://github.com/eclipse/californium/pull/16#discussion_r59236484","pull_request_url":"https://api.github.com/repos/eclipse/californium/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/eclipse/californium/pulls/comments/59236484"},"html":{"href":"https://github.com/eclipse/californium/pull/16#discussion_r59236484"},"pull_request":{"href":"https://api.github.com/repos/eclipse/californium/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/californium/pulls/16","id":61594654,"html_url":"https://github.com/eclipse/californium/pull/16","diff_url":"https://github.com/eclipse/californium/pull/16.diff","patch_url":"https://github.com/eclipse/californium/pull/16.patch","issue_url":"https://api.github.com/repos/eclipse/californium/issues/16","number":16,"state":"open","locked":false,"title":"Add clustering support for observe","user":{"login":"sbernard31","id":840294,"avatar_url":"https://avatars.githubusercontent.com/u/840294?v=3","gravatar_id":"","url":"https://api.github.com/users/sbernard31","html_url":"https://github.com/sbernard31","followers_url":"https://api.github.com/users/sbernard31/followers","following_url":"https://api.github.com/users/sbernard31/following{/other_user}","gists_url":"https://api.github.com/users/sbernard31/gists{/gist_id}","starred_url":"https://api.github.com/users/sbernard31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbernard31/subscriptions","organizations_url":"https://api.github.com/users/sbernard31/orgs","repos_url":"https://api.github.com/users/sbernard31/repos","events_url":"https://api.github.com/users/sbernard31/events{/privacy}","received_events_url":"https://api.github.com/users/sbernard31/received_events","type":"User","site_admin":false},"body":"The idea is to be able to handle observe notification in a cluster. (more detail available [here](https://github.com/eclipse/leshan/wiki/Cluster))\r\n\r\nTo resolve this issue, I introduce 2 new interfaces:\r\n  1. `NotificationListener` : to be able to get notification from any Californium instance.\r\n  1. `ObserveRequestStore`: to share the pending observation state through each instances.\r\n\r\nThe other \"big\" change is the `Exchange` instance lifetime for observation:\r\n* Before, the exchange lived all along the observe relation lifetime.\r\n* Now, we recreate an exchange for each notification. I mean a new `Exchange` instance is created from data stored in `ObserverRequestStore` each time we receive a new notification and will be completed/removed as soon as the notification is handled.\r\n\r\nAll of this is clearly a work in progress (e.g. notification over DTLS is not supported). The idea is to share my first step to know if I go in the right direction.\r\nSo feedback is welcome ;)","created_at":"2016-03-03T17:27:06Z","updated_at":"2016-04-11T16:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4e0ce05e4b12560a30e7f89baa2dda80a77a5f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/californium/pulls/16/commits","review_comments_url":"https://api.github.com/repos/eclipse/californium/pulls/16/comments","review_comment_url":"https://api.github.com/repos/eclipse/californium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/californium/issues/16/comments","statuses_url":"https://api.github.com/repos/eclipse/californium/statuses/04e3b3d59615f26c0b50cbf7a75ace54b99f801d","head":{"label":"eclipse:observe_clustering","ref":"observe_clustering","sha":"04e3b3d59615f26c0b50cbf7a75ace54b99f801d","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","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":43075480,"name":"californium","full_name":"eclipse/californium","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","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/californium","description":"","fork":false,"url":"https://api.github.com/repos/eclipse/californium","forks_url":"https://api.github.com/repos/eclipse/californium/forks","keys_url":"https://api.github.com/repos/eclipse/californium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/californium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/californium/teams","hooks_url":"https://api.github.com/repos/eclipse/californium/hooks","issue_events_url":"https://api.github.com/repos/eclipse/californium/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/californium/events","assignees_url":"https://api.github.com/repos/eclipse/californium/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/californium/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/californium/tags","blobs_url":"https://api.github.com/repos/eclipse/californium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/californium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/californium/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/californium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/californium/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/californium/languages","stargazers_url":"https://api.github.com/repos/eclipse/californium/stargazers","contributors_url":"https://api.github.com/repos/eclipse/californium/contributors","subscribers_url":"https://api.github.com/repos/eclipse/californium/subscribers","subscription_url":"https://api.github.com/repos/eclipse/californium/subscription","commits_url":"https://api.github.com/repos/eclipse/californium/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/californium/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/californium/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/californium/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/californium/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/californium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/californium/merges","archive_url":"https://api.github.com/repos/eclipse/californium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/californium/downloads","issues_url":"https://api.github.com/repos/eclipse/californium/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/californium/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/californium/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/californium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/californium/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/californium/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/californium/deployments","created_at":"2015-09-24T15:27:15Z","updated_at":"2016-04-05T11:25:50Z","pushed_at":"2016-04-11T15:19:20Z","git_url":"git://github.com/eclipse/californium.git","ssh_url":"git@github.com:eclipse/californium.git","clone_url":"https://github.com/eclipse/californium.git","svn_url":"https://github.com/eclipse/californium","homepage":null,"size":3281,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":11,"forks":27,"open_issues":11,"watchers":33,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"e78ac651f1a83d863362d26a8fad8486d21bff0e","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","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":43075480,"name":"californium","full_name":"eclipse/californium","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","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/californium","description":"","fork":false,"url":"https://api.github.com/repos/eclipse/californium","forks_url":"https://api.github.com/repos/eclipse/californium/forks","keys_url":"https://api.github.com/repos/eclipse/californium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/californium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/californium/teams","hooks_url":"https://api.github.com/repos/eclipse/californium/hooks","issue_events_url":"https://api.github.com/repos/eclipse/californium/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/californium/events","assignees_url":"https://api.github.com/repos/eclipse/californium/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/californium/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/californium/tags","blobs_url":"https://api.github.com/repos/eclipse/californium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/californium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/californium/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/californium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/californium/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/californium/languages","stargazers_url":"https://api.github.com/repos/eclipse/californium/stargazers","contributors_url":"https://api.github.com/repos/eclipse/californium/contributors","subscribers_url":"https://api.github.com/repos/eclipse/californium/subscribers","subscription_url":"https://api.github.com/repos/eclipse/californium/subscription","commits_url":"https://api.github.com/repos/eclipse/californium/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/californium/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/californium/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/californium/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/californium/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/californium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/californium/merges","archive_url":"https://api.github.com/repos/eclipse/californium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/californium/downloads","issues_url":"https://api.github.com/repos/eclipse/californium/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/californium/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/californium/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/californium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/californium/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/californium/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/californium/deployments","created_at":"2015-09-24T15:27:15Z","updated_at":"2016-04-05T11:25:50Z","pushed_at":"2016-04-11T15:19:20Z","git_url":"git://github.com/eclipse/californium.git","ssh_url":"git@github.com:eclipse/californium.git","clone_url":"https://github.com/eclipse/californium.git","svn_url":"https://github.com/eclipse/californium","homepage":null,"size":3281,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":11,"forks":27,"open_issues":11,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/californium/pulls/16"},"html":{"href":"https://github.com/eclipse/californium/pull/16"},"issue":{"href":"https://api.github.com/repos/eclipse/californium/issues/16"},"comments":{"href":"https://api.github.com/repos/eclipse/californium/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/californium/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/californium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/californium/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/californium/statuses/04e3b3d59615f26c0b50cbf7a75ace54b99f801d"}}}}