{"action":"created","issue":{"url":"https://api.github.com/repos/joeferner/node-java/issues/181","labels_url":"https://api.github.com/repos/joeferner/node-java/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/joeferner/node-java/issues/181/comments","events_url":"https://api.github.com/repos/joeferner/node-java/issues/181/events","html_url":"https://github.com/joeferner/node-java/pull/181","id":53576993,"number":181,"title":"First rough draft of adding support for promises.","user":{"login":"jimlloyd","id":18069,"avatar_url":"https://avatars.githubusercontent.com/u/18069?v=3","gravatar_id":"","url":"https://api.github.com/users/jimlloyd","html_url":"https://github.com/jimlloyd","followers_url":"https://api.github.com/users/jimlloyd/followers","following_url":"https://api.github.com/users/jimlloyd/following{/other_user}","gists_url":"https://api.github.com/users/jimlloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlloyd/subscriptions","organizations_url":"https://api.github.com/users/jimlloyd/orgs","repos_url":"https://api.github.com/users/jimlloyd/repos","events_url":"https://api.github.com/users/jimlloyd/events{/privacy}","received_events_url":"https://api.github.com/users/jimlloyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-06T23:23:26Z","updated_at":"2015-01-08T23:40:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joeferner/node-java/pulls/181","html_url":"https://github.com/joeferner/node-java/pull/181","diff_url":"https://github.com/joeferner/node-java/pull/181.diff","patch_url":"https://github.com/joeferner/node-java/pull/181.patch"},"body":"@joeferner: Hi Joe, I managed to get something working for Issue #180.\r\n\r\nThis only promisifies the instance methods of the imported java classes, but adding support for static methods and promisifying the Java module itself is probably trivial in comparison.\r\n\r\nPlease review the changes in java.cpp and javaObject.cpp carefully. This implementation was almost blind trial and error without really trying to understand v8 and NAN. In particular I haven't tried to study how to properly handle garbage collection so I may have made mistakes there.\r\n\r\nTODO: \r\n\r\n1) More tests.\r\n2) Promisify static methods of Java classes.\r\n3) Promisify the various async methods of the Java module (newInstance, callMethod, callStaticMethod, etc.)\r\n"},"comment":{"url":"https://api.github.com/repos/joeferner/node-java/issues/comments/69270682","html_url":"https://github.com/joeferner/node-java/pull/181#issuecomment-69270682","issue_url":"https://api.github.com/repos/joeferner/node-java/issues/181","id":69270682,"user":{"login":"jimlloyd","id":18069,"avatar_url":"https://avatars.githubusercontent.com/u/18069?v=3","gravatar_id":"","url":"https://api.github.com/users/jimlloyd","html_url":"https://github.com/jimlloyd","followers_url":"https://api.github.com/users/jimlloyd/followers","following_url":"https://api.github.com/users/jimlloyd/following{/other_user}","gists_url":"https://api.github.com/users/jimlloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlloyd/subscriptions","organizations_url":"https://api.github.com/users/jimlloyd/orgs","repos_url":"https://api.github.com/users/jimlloyd/repos","events_url":"https://api.github.com/users/jimlloyd/events{/privacy}","received_events_url":"https://api.github.com/users/jimlloyd/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T23:40:21Z","updated_at":"2015-01-08T23:40:21Z","body":"@joeferner If you are ok with the above commits then all that remains is to update the README.md.\r\n\r\nNote, I changed asyncOptions.suffix -> asyncOptions.promiseSuffix as I anticipate we may want to allow changing the Sync suffix, and maybe add non-empty suffix for Async. Actually I have even more ambitious plans that I will propose to you later.\r\n\r\nAlso, see the commit comment for the last commit. I added an onJvmCreated callback to javascript. Any concerns about that approach?\r\n"}}