{"action":"created","comment":{"url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/comments/27123482","id":27123482,"diff_hunk":"@@ -0,0 +1,118 @@\n+package ar.com.carloscurotto.storm.complex.topology.propagator.gloss;\n+\n+import java.io.StringWriter;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+import javax.xml.bind.JAXBContext;\n+import javax.xml.bind.JAXBException;\n+import javax.xml.bind.Marshaller;\n+import javax.xml.transform.stream.StreamResult;\n+\n+import org.apache.commons.lang3.Validate;\n+\n+import ar.com.carloscurotto.storm.complex.service.OpenAwareService;\n+import ar.com.carloscurotto.storm.complex.topology.propagator.gloss.message.ExcpTradeStatusMessage;\n+import ar.com.carloscurotto.storm.complex.topology.propagator.gloss.message.NormalTradeStatusMessage;\n+import ar.com.carloscurotto.storm.complex.topology.propagator.gloss.message.TradeCommentsMessage;\n+import ar.com.carloscurotto.storm.complex.topology.propagator.gloss.message.TradeMessage;\n+import ar.com.carloscurotto.storm.complex.transport.Producer;\n+\n+/**\n+ * Sends the message into the queue. Knows what queue to use and knows how to marshall the messages.\n+ *\n+ * @author D540601\n+ */\n+public class MessageSender extends OpenAwareService<List<TradeMessage>, Void> {\n+\n+    protected Map<Class<? extends TradeMessage>, Marshaller> marshallers = new HashMap<Class<? extends TradeMessage>, Marshaller>();\n+\n+    private Producer<String> messageProducer;\n+\n+    /**\n+     * Constructs the MessageSender with the give message producer.\n+     * \n+     * @param theMessageProducer\n+     *            a {@link Producer<String>} that will be used to send the update messages to the consumer of the\n+     *            producer.\n+     */\n+    public MessageSender(final Producer<String> theMessageProducer) {\n+        Validate.notNull(theMessageProducer, \"The message producer cannot be null\");\n+        messageProducer = theMessageProducer;\n+    }\n+\n+    /**\n+     * Creates the marshallers for the trade status messages classes and stores them in the marshallers map.\n+     */\n+    @Override\n+    protected void doOpen() {","path":"src/main/java/ar/com/carloscurotto/storm/complex/topology/propagator/gloss/MessageSender.java","position":49,"original_position":49,"commit_id":"f6dedd8066322d141d3d60706298d6971106be7b","original_commit_id":"f6dedd8066322d141d3d60706298d6971106be7b","user":{"login":"mtkdante","id":11541282,"avatar_url":"https://avatars.githubusercontent.com/u/11541282?v=3","gravatar_id":"","url":"https://api.github.com/users/mtkdante","html_url":"https://github.com/mtkdante","followers_url":"https://api.github.com/users/mtkdante/followers","following_url":"https://api.github.com/users/mtkdante/following{/other_user}","gists_url":"https://api.github.com/users/mtkdante/gists{/gist_id}","starred_url":"https://api.github.com/users/mtkdante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtkdante/subscriptions","organizations_url":"https://api.github.com/users/mtkdante/orgs","repos_url":"https://api.github.com/users/mtkdante/repos","events_url":"https://api.github.com/users/mtkdante/events{/privacy}","received_events_url":"https://api.github.com/users/mtkdante/received_events","type":"User","site_admin":false},"body":"fixed.","created_at":"2015-03-25T14:13:46Z","updated_at":"2015-03-25T14:13:46Z","html_url":"https://github.com/carloscurotto/storm-example/pull/1#discussion_r27123482","pull_request_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/comments/27123482"},"html":{"href":"https://github.com/carloscurotto/storm-example/pull/1#discussion_r27123482"},"pull_request":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1","id":31466648,"html_url":"https://github.com/carloscurotto/storm-example/pull/1","diff_url":"https://github.com/carloscurotto/storm-example/pull/1.diff","patch_url":"https://github.com/carloscurotto/storm-example/pull/1.patch","issue_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/1","number":1,"state":"open","locked":false,"title":"Gloss submodule","user":{"login":"emacampolo","id":1101540,"avatar_url":"https://avatars.githubusercontent.com/u/1101540?v=3","gravatar_id":"","url":"https://api.github.com/users/emacampolo","html_url":"https://github.com/emacampolo","followers_url":"https://api.github.com/users/emacampolo/followers","following_url":"https://api.github.com/users/emacampolo/following{/other_user}","gists_url":"https://api.github.com/users/emacampolo/gists{/gist_id}","starred_url":"https://api.github.com/users/emacampolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emacampolo/subscriptions","organizations_url":"https://api.github.com/users/emacampolo/orgs","repos_url":"https://api.github.com/users/emacampolo/repos","events_url":"https://api.github.com/users/emacampolo/events{/privacy}","received_events_url":"https://api.github.com/users/emacampolo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-18T20:06:04Z","updated_at":"2015-03-25T14:13:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd67018779ae18a5d42ed453719c9ceffc181ca8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1/commits","review_comments_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1/comments","review_comment_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls/comments{/number}","comments_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/1/comments","statuses_url":"https://api.github.com/repos/carloscurotto/storm-example/statuses/f6dedd8066322d141d3d60706298d6971106be7b","head":{"label":"carloscurotto:glossSubmodule","ref":"glossSubmodule","sha":"f6dedd8066322d141d3d60706298d6971106be7b","user":{"login":"carloscurotto","id":1410334,"avatar_url":"https://avatars.githubusercontent.com/u/1410334?v=3","gravatar_id":"","url":"https://api.github.com/users/carloscurotto","html_url":"https://github.com/carloscurotto","followers_url":"https://api.github.com/users/carloscurotto/followers","following_url":"https://api.github.com/users/carloscurotto/following{/other_user}","gists_url":"https://api.github.com/users/carloscurotto/gists{/gist_id}","starred_url":"https://api.github.com/users/carloscurotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carloscurotto/subscriptions","organizations_url":"https://api.github.com/users/carloscurotto/orgs","repos_url":"https://api.github.com/users/carloscurotto/repos","events_url":"https://api.github.com/users/carloscurotto/events{/privacy}","received_events_url":"https://api.github.com/users/carloscurotto/received_events","type":"User","site_admin":false},"repo":{"id":10831185,"name":"storm-example","full_name":"carloscurotto/storm-example","owner":{"login":"carloscurotto","id":1410334,"avatar_url":"https://avatars.githubusercontent.com/u/1410334?v=3","gravatar_id":"","url":"https://api.github.com/users/carloscurotto","html_url":"https://github.com/carloscurotto","followers_url":"https://api.github.com/users/carloscurotto/followers","following_url":"https://api.github.com/users/carloscurotto/following{/other_user}","gists_url":"https://api.github.com/users/carloscurotto/gists{/gist_id}","starred_url":"https://api.github.com/users/carloscurotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carloscurotto/subscriptions","organizations_url":"https://api.github.com/users/carloscurotto/orgs","repos_url":"https://api.github.com/users/carloscurotto/repos","events_url":"https://api.github.com/users/carloscurotto/events{/privacy}","received_events_url":"https://api.github.com/users/carloscurotto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carloscurotto/storm-example","description":"A simple example of use of the storm framework for online stream processing","fork":false,"url":"https://api.github.com/repos/carloscurotto/storm-example","forks_url":"https://api.github.com/repos/carloscurotto/storm-example/forks","keys_url":"https://api.github.com/repos/carloscurotto/storm-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carloscurotto/storm-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carloscurotto/storm-example/teams","hooks_url":"https://api.github.com/repos/carloscurotto/storm-example/hooks","issue_events_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/events{/number}","events_url":"https://api.github.com/repos/carloscurotto/storm-example/events","assignees_url":"https://api.github.com/repos/carloscurotto/storm-example/assignees{/user}","branches_url":"https://api.github.com/repos/carloscurotto/storm-example/branches{/branch}","tags_url":"https://api.github.com/repos/carloscurotto/storm-example/tags","blobs_url":"https://api.github.com/repos/carloscurotto/storm-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carloscurotto/storm-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carloscurotto/storm-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/carloscurotto/storm-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carloscurotto/storm-example/statuses/{sha}","languages_url":"https://api.github.com/repos/carloscurotto/storm-example/languages","stargazers_url":"https://api.github.com/repos/carloscurotto/storm-example/stargazers","contributors_url":"https://api.github.com/repos/carloscurotto/storm-example/contributors","subscribers_url":"https://api.github.com/repos/carloscurotto/storm-example/subscribers","subscription_url":"https://api.github.com/repos/carloscurotto/storm-example/subscription","commits_url":"https://api.github.com/repos/carloscurotto/storm-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/carloscurotto/storm-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/carloscurotto/storm-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/carloscurotto/storm-example/contents/{+path}","compare_url":"https://api.github.com/repos/carloscurotto/storm-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carloscurotto/storm-example/merges","archive_url":"https://api.github.com/repos/carloscurotto/storm-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carloscurotto/storm-example/downloads","issues_url":"https://api.github.com/repos/carloscurotto/storm-example/issues{/number}","pulls_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls{/number}","milestones_url":"https://api.github.com/repos/carloscurotto/storm-example/milestones{/number}","notifications_url":"https://api.github.com/repos/carloscurotto/storm-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carloscurotto/storm-example/labels{/name}","releases_url":"https://api.github.com/repos/carloscurotto/storm-example/releases{/id}","created_at":"2013-06-20T22:51:59Z","updated_at":"2015-03-25T02:56:10Z","pushed_at":"2015-03-25T02:56:10Z","git_url":"git://github.com/carloscurotto/storm-example.git","ssh_url":"git@github.com:carloscurotto/storm-example.git","clone_url":"https://github.com/carloscurotto/storm-example.git","svn_url":"https://github.com/carloscurotto/storm-example","homepage":null,"size":648,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":0,"default_branch":"master"}},"base":{"label":"carloscurotto:master","ref":"master","sha":"e2b8e4a2f78a87bab6c5b651a736cfcd0e14e0d5","user":{"login":"carloscurotto","id":1410334,"avatar_url":"https://avatars.githubusercontent.com/u/1410334?v=3","gravatar_id":"","url":"https://api.github.com/users/carloscurotto","html_url":"https://github.com/carloscurotto","followers_url":"https://api.github.com/users/carloscurotto/followers","following_url":"https://api.github.com/users/carloscurotto/following{/other_user}","gists_url":"https://api.github.com/users/carloscurotto/gists{/gist_id}","starred_url":"https://api.github.com/users/carloscurotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carloscurotto/subscriptions","organizations_url":"https://api.github.com/users/carloscurotto/orgs","repos_url":"https://api.github.com/users/carloscurotto/repos","events_url":"https://api.github.com/users/carloscurotto/events{/privacy}","received_events_url":"https://api.github.com/users/carloscurotto/received_events","type":"User","site_admin":false},"repo":{"id":10831185,"name":"storm-example","full_name":"carloscurotto/storm-example","owner":{"login":"carloscurotto","id":1410334,"avatar_url":"https://avatars.githubusercontent.com/u/1410334?v=3","gravatar_id":"","url":"https://api.github.com/users/carloscurotto","html_url":"https://github.com/carloscurotto","followers_url":"https://api.github.com/users/carloscurotto/followers","following_url":"https://api.github.com/users/carloscurotto/following{/other_user}","gists_url":"https://api.github.com/users/carloscurotto/gists{/gist_id}","starred_url":"https://api.github.com/users/carloscurotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carloscurotto/subscriptions","organizations_url":"https://api.github.com/users/carloscurotto/orgs","repos_url":"https://api.github.com/users/carloscurotto/repos","events_url":"https://api.github.com/users/carloscurotto/events{/privacy}","received_events_url":"https://api.github.com/users/carloscurotto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carloscurotto/storm-example","description":"A simple example of use of the storm framework for online stream processing","fork":false,"url":"https://api.github.com/repos/carloscurotto/storm-example","forks_url":"https://api.github.com/repos/carloscurotto/storm-example/forks","keys_url":"https://api.github.com/repos/carloscurotto/storm-example/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carloscurotto/storm-example/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carloscurotto/storm-example/teams","hooks_url":"https://api.github.com/repos/carloscurotto/storm-example/hooks","issue_events_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/events{/number}","events_url":"https://api.github.com/repos/carloscurotto/storm-example/events","assignees_url":"https://api.github.com/repos/carloscurotto/storm-example/assignees{/user}","branches_url":"https://api.github.com/repos/carloscurotto/storm-example/branches{/branch}","tags_url":"https://api.github.com/repos/carloscurotto/storm-example/tags","blobs_url":"https://api.github.com/repos/carloscurotto/storm-example/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carloscurotto/storm-example/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carloscurotto/storm-example/git/refs{/sha}","trees_url":"https://api.github.com/repos/carloscurotto/storm-example/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carloscurotto/storm-example/statuses/{sha}","languages_url":"https://api.github.com/repos/carloscurotto/storm-example/languages","stargazers_url":"https://api.github.com/repos/carloscurotto/storm-example/stargazers","contributors_url":"https://api.github.com/repos/carloscurotto/storm-example/contributors","subscribers_url":"https://api.github.com/repos/carloscurotto/storm-example/subscribers","subscription_url":"https://api.github.com/repos/carloscurotto/storm-example/subscription","commits_url":"https://api.github.com/repos/carloscurotto/storm-example/commits{/sha}","git_commits_url":"https://api.github.com/repos/carloscurotto/storm-example/git/commits{/sha}","comments_url":"https://api.github.com/repos/carloscurotto/storm-example/comments{/number}","issue_comment_url":"https://api.github.com/repos/carloscurotto/storm-example/issues/comments{/number}","contents_url":"https://api.github.com/repos/carloscurotto/storm-example/contents/{+path}","compare_url":"https://api.github.com/repos/carloscurotto/storm-example/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carloscurotto/storm-example/merges","archive_url":"https://api.github.com/repos/carloscurotto/storm-example/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carloscurotto/storm-example/downloads","issues_url":"https://api.github.com/repos/carloscurotto/storm-example/issues{/number}","pulls_url":"https://api.github.com/repos/carloscurotto/storm-example/pulls{/number}","milestones_url":"https://api.github.com/repos/carloscurotto/storm-example/milestones{/number}","notifications_url":"https://api.github.com/repos/carloscurotto/storm-example/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carloscurotto/storm-example/labels{/name}","releases_url":"https://api.github.com/repos/carloscurotto/storm-example/releases{/id}","created_at":"2013-06-20T22:51:59Z","updated_at":"2015-03-25T02:56:10Z","pushed_at":"2015-03-25T02:56:10Z","git_url":"git://github.com/carloscurotto/storm-example.git","ssh_url":"git@github.com:carloscurotto/storm-example.git","clone_url":"https://github.com/carloscurotto/storm-example.git","svn_url":"https://github.com/carloscurotto/storm-example","homepage":null,"size":648,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1"},"html":{"href":"https://github.com/carloscurotto/storm-example/pull/1"},"issue":{"href":"https://api.github.com/repos/carloscurotto/storm-example/issues/1"},"comments":{"href":"https://api.github.com/repos/carloscurotto/storm-example/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/carloscurotto/storm-example/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/carloscurotto/storm-example/statuses/f6dedd8066322d141d3d60706298d6971106be7b"}}}}