{"action":"created","comment":{"url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/comments/41101167","id":41101167,"diff_hunk":"@@ -0,0 +1,56 @@\n+package main.java.ru.fizteh.fivt.students.ypechatnov;\n+\n+\n+import java.util.*;\n+\n+import twitter4j.StallWarning;\n+import twitter4j.Status;\n+import twitter4j.StatusAdapter;\n+import twitter4j.StatusDeletionNotice;\n+\n+import java.util.concurrent.ConcurrentLinkedQueue;\n+\n+/**\n+ * Created by ura on 27.09.15.\n+ */\n+public class TwitterListener extends StatusAdapter {\n+    private ConcurrentLinkedQueue<String> outs;\n+    private static final int LIMIT = 1000000;\n+\n+    public void init() {\n+        outs = new ConcurrentLinkedQueue<String>();\n+    }\n+\n+    public void addTweetStr(String str) {\n+        // There is no need to store more\n+        // And memory can run out\n+        if (outs.size() < LIMIT) {\n+            outs.add(str);\n+        }\n+    }\n+\n+    public String pollTweetStr() {\n+        return outs.poll();\n+    }\n+\n+    @Override\n+    public void onStatus(Status status) {\n+        addTweetStr(TwitterStream.oneTweetToStr(status, TwitterStream.ShowTime.no));\n+    }\n+    @Override\n+    public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {\n+        return;\n+    }\n+    @Override\n+    public void onStallWarning(StallWarning warning) {\n+        System.err.println(\"Warning:\" + warning);\n+    }\n+    @Override\n+    public void onException(Exception ex) {\n+        System.err.println(\"Exception: \" + ex.getMessage());\n+    }\n+    @Override\n+    public void onScrubGeo(long a, long b) { }","path":"ypechatnov/src/main/java/ru/fizteh/fivt/students/ypechatnov/TwitterListener.java","position":53,"original_position":53,"commit_id":"70d7a4ae28ded4a0d7dfb6f59f326f76358a3706","original_commit_id":"70d7a4ae28ded4a0d7dfb6f59f326f76358a3706","user":{"login":"yuri-pechatnov","id":1867157,"avatar_url":"https://avatars.githubusercontent.com/u/1867157?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-pechatnov","html_url":"https://github.com/yuri-pechatnov","followers_url":"https://api.github.com/users/yuri-pechatnov/followers","following_url":"https://api.github.com/users/yuri-pechatnov/following{/other_user}","gists_url":"https://api.github.com/users/yuri-pechatnov/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-pechatnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-pechatnov/subscriptions","organizations_url":"https://api.github.com/users/yuri-pechatnov/orgs","repos_url":"https://api.github.com/users/yuri-pechatnov/repos","events_url":"https://api.github.com/users/yuri-pechatnov/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-pechatnov/received_events","type":"User","site_admin":false},"body":"Я не знаю, как они определены, но на всякий случай заoverrideил все что было (у меня была/есть проблема с лишним выводом непонятно откуда). К тому же в примере который я находил, вывод был в System.out","created_at":"2015-10-04T19:14:45Z","updated_at":"2015-10-04T19:14:45Z","html_url":"https://github.com/akormushin/fizteh-java-2015/pull/57#discussion_r41101167","pull_request_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/comments/41101167"},"html":{"href":"https://github.com/akormushin/fizteh-java-2015/pull/57#discussion_r41101167"},"pull_request":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57","id":46127793,"html_url":"https://github.com/akormushin/fizteh-java-2015/pull/57","diff_url":"https://github.com/akormushin/fizteh-java-2015/pull/57.diff","patch_url":"https://github.com/akormushin/fizteh-java-2015/pull/57.patch","issue_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/57","number":57,"state":"open","locked":false,"title":"Печатнов Юрий, 495. TwitterStream. Somehow working sketch.","user":{"login":"yuri-pechatnov","id":1867157,"avatar_url":"https://avatars.githubusercontent.com/u/1867157?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-pechatnov","html_url":"https://github.com/yuri-pechatnov","followers_url":"https://api.github.com/users/yuri-pechatnov/followers","following_url":"https://api.github.com/users/yuri-pechatnov/following{/other_user}","gists_url":"https://api.github.com/users/yuri-pechatnov/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-pechatnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-pechatnov/subscriptions","organizations_url":"https://api.github.com/users/yuri-pechatnov/orgs","repos_url":"https://api.github.com/users/yuri-pechatnov/repos","events_url":"https://api.github.com/users/yuri-pechatnov/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-pechatnov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-28T07:42:24Z","updated_at":"2015-10-04T19:14:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8964ce1c7032f087d9d521b8982eca88dcd4723","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57/commits","review_comments_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57/comments","review_comment_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/57/comments","statuses_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/statuses/70d7a4ae28ded4a0d7dfb6f59f326f76358a3706","head":{"label":"yuri-pechatnov:master","ref":"master","sha":"70d7a4ae28ded4a0d7dfb6f59f326f76358a3706","user":{"login":"yuri-pechatnov","id":1867157,"avatar_url":"https://avatars.githubusercontent.com/u/1867157?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-pechatnov","html_url":"https://github.com/yuri-pechatnov","followers_url":"https://api.github.com/users/yuri-pechatnov/followers","following_url":"https://api.github.com/users/yuri-pechatnov/following{/other_user}","gists_url":"https://api.github.com/users/yuri-pechatnov/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-pechatnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-pechatnov/subscriptions","organizations_url":"https://api.github.com/users/yuri-pechatnov/orgs","repos_url":"https://api.github.com/users/yuri-pechatnov/repos","events_url":"https://api.github.com/users/yuri-pechatnov/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-pechatnov/received_events","type":"User","site_admin":false},"repo":{"id":42513913,"name":"fizteh-java-2015","full_name":"yuri-pechatnov/fizteh-java-2015","owner":{"login":"yuri-pechatnov","id":1867157,"avatar_url":"https://avatars.githubusercontent.com/u/1867157?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-pechatnov","html_url":"https://github.com/yuri-pechatnov","followers_url":"https://api.github.com/users/yuri-pechatnov/followers","following_url":"https://api.github.com/users/yuri-pechatnov/following{/other_user}","gists_url":"https://api.github.com/users/yuri-pechatnov/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-pechatnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-pechatnov/subscriptions","organizations_url":"https://api.github.com/users/yuri-pechatnov/orgs","repos_url":"https://api.github.com/users/yuri-pechatnov/repos","events_url":"https://api.github.com/users/yuri-pechatnov/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-pechatnov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri-pechatnov/fizteh-java-2015","description":"","fork":true,"url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015","forks_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/forks","keys_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/teams","hooks_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/hooks","issue_events_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/issues/events{/number}","events_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/events","assignees_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/assignees{/user}","branches_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/branches{/branch}","tags_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/tags","blobs_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/languages","stargazers_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/stargazers","contributors_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/contributors","subscribers_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/subscribers","subscription_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/subscription","commits_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/contents/{+path}","compare_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/merges","archive_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/downloads","issues_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/issues{/number}","pulls_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/labels{/name}","releases_url":"https://api.github.com/repos/yuri-pechatnov/fizteh-java-2015/releases{/id}","created_at":"2015-09-15T11:09:47Z","updated_at":"2015-09-15T11:09:48Z","pushed_at":"2015-09-27T19:08:15Z","git_url":"git://github.com/yuri-pechatnov/fizteh-java-2015.git","ssh_url":"git@github.com:yuri-pechatnov/fizteh-java-2015.git","clone_url":"https://github.com/yuri-pechatnov/fizteh-java-2015.git","svn_url":"https://github.com/yuri-pechatnov/fizteh-java-2015","homepage":null,"size":228,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"akormushin:master","ref":"master","sha":"9220bc40f3d4aba8e97f1e3230b8c9896f63e28c","user":{"login":"akormushin","id":1074038,"avatar_url":"https://avatars.githubusercontent.com/u/1074038?v=3","gravatar_id":"","url":"https://api.github.com/users/akormushin","html_url":"https://github.com/akormushin","followers_url":"https://api.github.com/users/akormushin/followers","following_url":"https://api.github.com/users/akormushin/following{/other_user}","gists_url":"https://api.github.com/users/akormushin/gists{/gist_id}","starred_url":"https://api.github.com/users/akormushin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akormushin/subscriptions","organizations_url":"https://api.github.com/users/akormushin/orgs","repos_url":"https://api.github.com/users/akormushin/repos","events_url":"https://api.github.com/users/akormushin/events{/privacy}","received_events_url":"https://api.github.com/users/akormushin/received_events","type":"User","site_admin":false},"repo":{"id":42108549,"name":"fizteh-java-2015","full_name":"akormushin/fizteh-java-2015","owner":{"login":"akormushin","id":1074038,"avatar_url":"https://avatars.githubusercontent.com/u/1074038?v=3","gravatar_id":"","url":"https://api.github.com/users/akormushin","html_url":"https://github.com/akormushin","followers_url":"https://api.github.com/users/akormushin/followers","following_url":"https://api.github.com/users/akormushin/following{/other_user}","gists_url":"https://api.github.com/users/akormushin/gists{/gist_id}","starred_url":"https://api.github.com/users/akormushin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akormushin/subscriptions","organizations_url":"https://api.github.com/users/akormushin/orgs","repos_url":"https://api.github.com/users/akormushin/repos","events_url":"https://api.github.com/users/akormushin/events{/privacy}","received_events_url":"https://api.github.com/users/akormushin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akormushin/fizteh-java-2015","description":"","fork":false,"url":"https://api.github.com/repos/akormushin/fizteh-java-2015","forks_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/forks","keys_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/teams","hooks_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/hooks","issue_events_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/events{/number}","events_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/events","assignees_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/assignees{/user}","branches_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/branches{/branch}","tags_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/tags","blobs_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/statuses/{sha}","languages_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/languages","stargazers_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/stargazers","contributors_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/contributors","subscribers_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/subscribers","subscription_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/subscription","commits_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/contents/{+path}","compare_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/merges","archive_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/downloads","issues_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues{/number}","pulls_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls{/number}","milestones_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/milestones{/number}","notifications_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/labels{/name}","releases_url":"https://api.github.com/repos/akormushin/fizteh-java-2015/releases{/id}","created_at":"2015-09-08T11:37:54Z","updated_at":"2015-09-14T13:54:17Z","pushed_at":"2015-10-04T18:53:41Z","git_url":"git://github.com/akormushin/fizteh-java-2015.git","ssh_url":"git@github.com:akormushin/fizteh-java-2015.git","clone_url":"https://github.com/akormushin/fizteh-java-2015.git","svn_url":"https://github.com/akormushin/fizteh-java-2015","homepage":null,"size":3853,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":24,"forks":39,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57"},"html":{"href":"https://github.com/akormushin/fizteh-java-2015/pull/57"},"issue":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/57"},"comments":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/akormushin/fizteh-java-2015/statuses/70d7a4ae28ded4a0d7dfb6f59f326f76358a3706"}}}}