{"action":"created","issue":{"url":"https://api.github.com/repos/clouway/clouwaypush/issues/4","labels_url":"https://api.github.com/repos/clouway/clouwaypush/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/clouway/clouwaypush/issues/4/comments","events_url":"https://api.github.com/repos/clouway/clouwaypush/issues/4/events","html_url":"https://github.com/clouway/clouwaypush/pull/4","id":62464618,"number":4,"title":"Open only one chanel for one subscriber","user":{"login":"georgievJon","id":300624,"avatar_url":"https://avatars.githubusercontent.com/u/300624?v=3","gravatar_id":"","url":"https://api.github.com/users/georgievJon","html_url":"https://github.com/georgievJon","followers_url":"https://api.github.com/users/georgievJon/followers","following_url":"https://api.github.com/users/georgievJon/following{/other_user}","gists_url":"https://api.github.com/users/georgievJon/gists{/gist_id}","starred_url":"https://api.github.com/users/georgievJon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgievJon/subscriptions","organizations_url":"https://api.github.com/users/georgievJon/orgs","repos_url":"https://api.github.com/users/georgievJon/repos","events_url":"https://api.github.com/users/georgievJon/events{/privacy}","received_events_url":"https://api.github.com/users/georgievJon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T17:25:26Z","updated_at":"2015-03-17T18:08:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/clouway/clouwaypush/pulls/4","html_url":"https://github.com/clouway/clouwaypush/pull/4","diff_url":"https://github.com/clouway/clouwaypush/pull/4.diff","patch_url":"https://github.com/clouway/clouwaypush/pull/4.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/clouway/clouwaypush/issues/comments/82504140","html_url":"https://github.com/clouway/clouwaypush/pull/4#issuecomment-82504140","issue_url":"https://api.github.com/repos/clouway/clouwaypush/issues/4","id":82504140,"user":{"login":"mgenov","id":209223,"avatar_url":"https://avatars.githubusercontent.com/u/209223?v=3","gravatar_id":"","url":"https://api.github.com/users/mgenov","html_url":"https://github.com/mgenov","followers_url":"https://api.github.com/users/mgenov/followers","following_url":"https://api.github.com/users/mgenov/following{/other_user}","gists_url":"https://api.github.com/users/mgenov/gists{/gist_id}","starred_url":"https://api.github.com/users/mgenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgenov/subscriptions","organizations_url":"https://api.github.com/users/mgenov/orgs","repos_url":"https://api.github.com/users/mgenov/repos","events_url":"https://api.github.com/users/mgenov/events{/privacy}","received_events_url":"https://api.github.com/users/mgenov/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T18:08:17Z","updated_at":"2015-03-17T18:08:17Z","body":"This part needs refactoring: \r\n\r\n```java\r\n  pushChannel = new PushChannelApiImpl(pushChannelServiceAsync,\r\n                                         channel,\r\n                                         timer,\r\n                                         Providers.of(subscriber),\r\n                                         Providers.of(subscribeRequestSecondsRetries),\r\n                                         Providers.of(unsubscribeRequestSecondsRetries),\r\n                                         Providers.of(keepAliveRequestSecondsRetries));\r\n```\r\n\r\nHere is one idea: \r\n```java\r\npublic interface Retry {\r\n   void execute(PushChannelApi api);\r\n}\r\n\r\nclass KeepAliveRetry implements Retry {\r\n public PushChannelApiImpl(Timer timer) {\r\n\r\n  }\r\n   void execute() {\r\n\r\n   }\r\n}\r\n```\r\n\r\nI'm not familiar with other dependencies, but the idea is described. "}}