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 databetween deployment and runtime, seeDevConsoleManager.setGlobal(String, Object)andDevConsoleManager.getGlobal(String).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TcreateLink(Map<String,?> linkData)Map<String,?>createLinkData(T object)
-
-
-
Method Detail
-
createLinkData
Map<String,?> createLinkData(T object)
- 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
T createLink(Map<String,?> linkData)
- 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.
-
-