{"action":"created","comment":{"url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/comments/205222403","pull_request_review_id":140450403,"id":205222403,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTIyMjQwMw==","diff_hunk":"@@ -124,6 +124,76 @@ public String toString() {\n         return asMap().toString();\n     }\n \n+    public Object getObject() {\n+        return this.object;\n+    }\n+    \n+    public String getSourceName() {\n+        return this.resourceId;\n+    }\n+    \n+    public Map<String,Object> getMessageHeaders() {\n+        return this.messageHeaders;\n+    }\n+    \n+    public String getOp() {\n+        return this.op;\n+    }\n+    \n+    /**\n+     * Extract reply address from a message.\n+     *\n+     * This is a utility method that examines the various forms a message may take and\n+     * extracts the reply address if present.\n+     *\n+     * @param msg Message from which to extract the reply address\n+     * @return String The reply address (or null if absent from msg).\n+     *\n+     * @throws IllegalArgumentException if the msg parameter with neither a Map nor an ExtensionServiceMessage\n+     *\n+     */\n+    public static String extractQueryAddressFromMaybeMap(Object msg) {\n+        String repAddr = null;\n+        Object maybeRepAddr = null;\n+        if (msg instanceof Map) {\n+            Map msgMap = (Map) msg;\n+            Object maybeMap = msgMap.get(ExtensionServiceMessage.PROPERTY_MESSAGE_HEADERS);\n+            if (maybeMap instanceof Map) {\n+                maybeRepAddr = ((Map) msgMap.get(ExtensionServiceMessage.PROPERTY_MESSAGE_HEADERS)).get(ExtensionServiceMessage.ORIGIN_ADDRESS_LOCATION);\n+                if (maybeRepAddr != null && maybeRepAddr instanceof String) {\n+                    repAddr = (String) maybeRepAddr;\n+                }\n+            }\n+        } else if (msg instanceof ExtensionServiceMessage) {\n+            ExtensionServiceMessage esm = (ExtensionServiceMessage) msg;\n+            maybeRepAddr = esm.messageHeaders.get(ExtensionServiceMessage.ORIGIN_ADDRESS_LOCATION);\n+        } else {\n+            throw new IllegalArgumentException(\"extractReplyAddress requires either a Map or ExtensionServiceMessage; received \" + msg.getClass().getName());\n+        }\n+        if (maybeRepAddr instanceof String) {\n+            repAddr = (String) maybeRepAddr;\n+        }\n+        return repAddr;\n+    }\n+    \n+    /**\n+     * Extract reply address from a message.\n+     *\n+     * @param msg Message from which to extract the reply address\n+     * @return String The reply address (or null if absent).\n+     */\n+    public String extractQueryAddress() {\n+        String repAddr = null;\n+        Object maybeRepAddr = null;\n+\n+        maybeRepAddr = this.messageHeaders.get(ExtensionServiceMessage.ORIGIN_ADDRESS_LOCATION);","path":"extjsdk/src/main/java/io/vantiq/extjsdk/ExtensionServiceMessage.java","position":77,"original_position":77,"commit_id":"81aa1f8b2a0e01ad7491c7114aeac51ad2b66c08","original_commit_id":"81aa1f8b2a0e01ad7491c7114aeac51ad2b66c08","user":{"login":"AlexBlumer","id":9043537,"node_id":"MDQ6VXNlcjkwNDM1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/9043537?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexBlumer","html_url":"https://github.com/AlexBlumer","followers_url":"https://api.github.com/users/AlexBlumer/followers","following_url":"https://api.github.com/users/AlexBlumer/following{/other_user}","gists_url":"https://api.github.com/users/AlexBlumer/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexBlumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexBlumer/subscriptions","organizations_url":"https://api.github.com/users/AlexBlumer/orgs","repos_url":"https://api.github.com/users/AlexBlumer/repos","events_url":"https://api.github.com/users/AlexBlumer/events{/privacy}","received_events_url":"https://api.github.com/users/AlexBlumer/received_events","type":"User","site_admin":false},"body":"Will do","created_at":"2018-07-25T18:46:28Z","updated_at":"2018-07-25T18:46:28Z","html_url":"https://github.com/Vantiq/vantiq-extension-sources/pull/10#discussion_r205222403","pull_request_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/comments/205222403"},"html":{"href":"https://github.com/Vantiq/vantiq-extension-sources/pull/10#discussion_r205222403"},"pull_request":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10"}},"in_reply_to_id":205208028},"pull_request":{"url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10","id":203886115,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODg2MTE1","html_url":"https://github.com/Vantiq/vantiq-extension-sources/pull/10","diff_url":"https://github.com/Vantiq/vantiq-extension-sources/pull/10.diff","patch_url":"https://github.com/Vantiq/vantiq-extension-sources/pull/10.patch","issue_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/10","number":10,"state":"open","locked":false,"title":"Clarity improvements for EWSL's Handlers and getting from ExtensionServiceMessage and Response","user":{"login":"AlexBlumer","id":9043537,"node_id":"MDQ6VXNlcjkwNDM1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/9043537?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexBlumer","html_url":"https://github.com/AlexBlumer","followers_url":"https://api.github.com/users/AlexBlumer/followers","following_url":"https://api.github.com/users/AlexBlumer/following{/other_user}","gists_url":"https://api.github.com/users/AlexBlumer/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexBlumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexBlumer/subscriptions","organizations_url":"https://api.github.com/users/AlexBlumer/orgs","repos_url":"https://api.github.com/users/AlexBlumer/repos","events_url":"https://api.github.com/users/AlexBlumer/events{/privacy}","received_events_url":"https://api.github.com/users/AlexBlumer/received_events","type":"User","site_admin":false},"body":"* Added getters for the most useful elements of ExtSvcMsg and Response\r\n* EWSListener Handlers are now of type ExtSvcMsg or Response, with the exception of the override Handler\r\n* Added getters for the CompletableFutures in EWSClient, so they can be accessed without requesting a message sent\r\n* Renamed the constants for the query addresses. (I think they're a bit clearer now, but still not quite clear. Tell me if you have any thoughts on how to make them better.)\r\n* Relocated extractReplyAddress to ExtSvcMsg, since it seems like it might fit better there","created_at":"2018-07-25T15:59:15Z","updated_at":"2018-07-25T18:46:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2360e84e515e843129a8b3e9132c3ee5d8717211","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10/commits","review_comments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10/comments","review_comment_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/10/comments","statuses_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/statuses/81aa1f8b2a0e01ad7491c7114aeac51ad2b66c08","head":{"label":"Vantiq:ajb-handler-refactor","ref":"ajb-handler-refactor","sha":"81aa1f8b2a0e01ad7491c7114aeac51ad2b66c08","user":{"login":"Vantiq","id":16842966,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODQyOTY2","avatar_url":"https://avatars3.githubusercontent.com/u/16842966?v=4","gravatar_id":"","url":"https://api.github.com/users/Vantiq","html_url":"https://github.com/Vantiq","followers_url":"https://api.github.com/users/Vantiq/followers","following_url":"https://api.github.com/users/Vantiq/following{/other_user}","gists_url":"https://api.github.com/users/Vantiq/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantiq/subscriptions","organizations_url":"https://api.github.com/users/Vantiq/orgs","repos_url":"https://api.github.com/users/Vantiq/repos","events_url":"https://api.github.com/users/Vantiq/events{/privacy}","received_events_url":"https://api.github.com/users/Vantiq/received_events","type":"Organization","site_admin":false},"repo":{"id":141492069,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE0OTIwNjk=","name":"vantiq-extension-sources","full_name":"Vantiq/vantiq-extension-sources","owner":{"login":"Vantiq","id":16842966,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODQyOTY2","avatar_url":"https://avatars3.githubusercontent.com/u/16842966?v=4","gravatar_id":"","url":"https://api.github.com/users/Vantiq","html_url":"https://github.com/Vantiq","followers_url":"https://api.github.com/users/Vantiq/followers","following_url":"https://api.github.com/users/Vantiq/following{/other_user}","gists_url":"https://api.github.com/users/Vantiq/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantiq/subscriptions","organizations_url":"https://api.github.com/users/Vantiq/orgs","repos_url":"https://api.github.com/users/Vantiq/repos","events_url":"https://api.github.com/users/Vantiq/events{/privacy}","received_events_url":"https://api.github.com/users/Vantiq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vantiq/vantiq-extension-sources","description":"Contains source code for VANTIQ Extension sources as well as SDKs for building these sources.","fork":false,"url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources","forks_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/forks","keys_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/teams","hooks_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/hooks","issue_events_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/events{/number}","events_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/events","assignees_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/assignees{/user}","branches_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/branches{/branch}","tags_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/tags","blobs_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/statuses/{sha}","languages_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/languages","stargazers_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/stargazers","contributors_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/contributors","subscribers_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/subscribers","subscription_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/subscription","commits_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/contents/{+path}","compare_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/merges","archive_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/downloads","issues_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues{/number}","pulls_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls{/number}","milestones_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/milestones{/number}","notifications_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/labels{/name}","releases_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/releases{/id}","deployments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/deployments","created_at":"2018-07-18T21:27:30Z","updated_at":"2018-07-19T20:56:01Z","pushed_at":"2018-07-25T16:19:22Z","git_url":"git://github.com/Vantiq/vantiq-extension-sources.git","ssh_url":"git@github.com:Vantiq/vantiq-extension-sources.git","clone_url":"https://github.com/Vantiq/vantiq-extension-sources.git","svn_url":"https://github.com/Vantiq/vantiq-extension-sources","homepage":null,"size":118,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Vantiq:fhc-opcua-initial","ref":"fhc-opcua-initial","sha":"647ef104c7a38caf3ed39e0e3dcb161b7b3f35ea","user":{"login":"Vantiq","id":16842966,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODQyOTY2","avatar_url":"https://avatars3.githubusercontent.com/u/16842966?v=4","gravatar_id":"","url":"https://api.github.com/users/Vantiq","html_url":"https://github.com/Vantiq","followers_url":"https://api.github.com/users/Vantiq/followers","following_url":"https://api.github.com/users/Vantiq/following{/other_user}","gists_url":"https://api.github.com/users/Vantiq/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantiq/subscriptions","organizations_url":"https://api.github.com/users/Vantiq/orgs","repos_url":"https://api.github.com/users/Vantiq/repos","events_url":"https://api.github.com/users/Vantiq/events{/privacy}","received_events_url":"https://api.github.com/users/Vantiq/received_events","type":"Organization","site_admin":false},"repo":{"id":141492069,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE0OTIwNjk=","name":"vantiq-extension-sources","full_name":"Vantiq/vantiq-extension-sources","owner":{"login":"Vantiq","id":16842966,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODQyOTY2","avatar_url":"https://avatars3.githubusercontent.com/u/16842966?v=4","gravatar_id":"","url":"https://api.github.com/users/Vantiq","html_url":"https://github.com/Vantiq","followers_url":"https://api.github.com/users/Vantiq/followers","following_url":"https://api.github.com/users/Vantiq/following{/other_user}","gists_url":"https://api.github.com/users/Vantiq/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantiq/subscriptions","organizations_url":"https://api.github.com/users/Vantiq/orgs","repos_url":"https://api.github.com/users/Vantiq/repos","events_url":"https://api.github.com/users/Vantiq/events{/privacy}","received_events_url":"https://api.github.com/users/Vantiq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vantiq/vantiq-extension-sources","description":"Contains source code for VANTIQ Extension sources as well as SDKs for building these sources.","fork":false,"url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources","forks_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/forks","keys_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/teams","hooks_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/hooks","issue_events_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/events{/number}","events_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/events","assignees_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/assignees{/user}","branches_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/branches{/branch}","tags_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/tags","blobs_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/statuses/{sha}","languages_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/languages","stargazers_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/stargazers","contributors_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/contributors","subscribers_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/subscribers","subscription_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/subscription","commits_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/contents/{+path}","compare_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/merges","archive_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/downloads","issues_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues{/number}","pulls_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls{/number}","milestones_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/milestones{/number}","notifications_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/labels{/name}","releases_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/releases{/id}","deployments_url":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/deployments","created_at":"2018-07-18T21:27:30Z","updated_at":"2018-07-19T20:56:01Z","pushed_at":"2018-07-25T16:19:22Z","git_url":"git://github.com/Vantiq/vantiq-extension-sources.git","ssh_url":"git@github.com:Vantiq/vantiq-extension-sources.git","clone_url":"https://github.com/Vantiq/vantiq-extension-sources.git","svn_url":"https://github.com/Vantiq/vantiq-extension-sources","homepage":null,"size":118,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10"},"html":{"href":"https://github.com/Vantiq/vantiq-extension-sources/pull/10"},"issue":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/10"},"comments":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/Vantiq/vantiq-extension-sources/statuses/81aa1f8b2a0e01ad7491c7114aeac51ad2b66c08"}},"author_association":"NONE"}}
{"actor":{"display_login":"AlexBlumer"}}