Package io.quarkus.dev.console
Interface DeploymentLinker<T>
public interface DeploymentLinker<T>
Creates "links" to objects between deployment and runtime,
essentially exposing the same interface but on a different classloader.
This implies all communication must go through JDK classes, so the transfer involves Maps, Functions, ... Yes this is awful. No there's no better solution ATM. Ideally we'd automate this through bytecode generation, but feasibility is uncertain, and we'd need a volunteer who has time for that.
Implementations should live in the runtime module.
To transfer link data between deployment and runtime,
see DevConsoleManager.setGlobal(String, Object) and DevConsoleManager.getGlobal(String).
-
Method Summary
-
Method Details
-
createLinkData
- Parameters:
object- An object implementing classTin either the current classloader.- Returns:
- A classloader-independent map containing Functions, Suppliers, etc.
giving access to the object's methods,
which will be passed to
createLink(Map)from the other classloader.
-
createLink
- Parameters:
linkData- The result of callingcreateLinkData(Object).- Returns:
- An object implementing class
Tin the current classloader and redirecting calls to the Functions, Suppliers, etc. fromlinkData, thereby linking to the implementation in its original classloader.
-