Class EventBasedJavaSourceResolver

java.lang.Object
io.quarkus.qute.debug.client.EventBasedJavaSourceResolver
All Implemented Interfaces:
JavaSourceResolver

public class EventBasedJavaSourceResolver extends Object implements JavaSourceResolver
JavaSourceResolver implementation for event-based clients (VS Code, etc.).

When the debugger needs to resolve a Qute template to a Java source, this resolver sends an event to the client and waits asynchronously for the client to respond.

  • Constructor Details

  • Method Details

    • resolveJavaSource

      Resolves a Java source from a Qute template by sending an event to the client.

      Returns a CompletableFuture that will be completed when the client responds via the qute/onJavaSourceResolved notification.

      Specified by:
      resolveJavaSource in interface JavaSourceResolver
      Parameters:
      args - the arguments describing the Java element to resolve
      Returns:
      a future completing with the resolved Java source location
    • handleResponse

      public void handleResponse(JavaSourceLocationEventResponse response)
      Handles the response from the client when a Java source has been resolved.

      This should be called by the client event handler when it receives the qute/onJavaSourceResolved notification.

    • cancel

      public void cancel(String id)
      Optionally handles a cancellation from the server side.