Merge Request #14 · created by Harshad RJ

Dispatcher refactor

This is a significant design refactor. It fixes #27 and #43.

Clear separation of concerns

There are now three layers of functionality:

  • Core layer which contains the main JavaPoly API and logic
  • Dipatcher layer which deals with dispatching messages to JVM
  • JVM layer which runs the JVM and request handling of JavaPoly commands

Things which have been removed

  • QueueExecutor and associated logic such as jvmReadyPromise
  • installListener() API from dispatchers and JVM (it is now an internal detail of dispatcher)
  • callback parameter from JavaPolyLoader
  • There were two listeners for webworker messages. There is now only one listener.


This branch has been tested with 8 combinations:

  • Chromium and Firefox
  • With and without webworkers
  • Two test pages: test/index.html and test/java_source_file.html


There are still some changes that can be done, especially around the loading of "Java mime" scripts. However, I am making a PR early, so that others don't get blocked.

Please review.

From hrjet9:i27_refactor into jimsproch:master

Merged by Harshad RJ

2 participants

Assignee: Jim Sproch

Milestone: none

0 up
0 down

25 Dec, 2015

1 commit

23 Dec, 2015

7 commits