A ClassLoader loading remote java class via WebSocket.
Deploy ClassProvider to JSR-356 container, e.g. undertow, tomcat.
Use class loader as following:
ClassLoader cl = new WebSocketClassLoader("ws://class-provider-host:port");
Class<?> hogeClass = cl.loadClass("org.example.HogeHoge", true);
class binary format
+-----------------------------------------------+
v |
+----------------------+ loadClass request +---------------+
| Thin Application | (WebSocket) | ClassProvider |
| WebSocketClassLoader | ---------------------> | |
+----------------------+ +---------------+
Apache License 2.0 (c) 2014-2017 Yoshitaka Kawashima