Class ModuleRegistrationHandler

java.lang.Object
ai.pipestream.registration.handlers.ModuleRegistrationHandler

@ApplicationScoped public class ModuleRegistrationHandler extends Object
Handles module registration operations.

Blocking — registration streams RegistrationEvents to the supplied sink as each step completes (validate → Consul → health → Apicurio → database → OpenSearch) on the caller's virtual thread.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the handler bean.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    registerModule(ai.pipestream.platform.registration.v1.RegisterRequest request, Consumer<ai.pipestream.platform.registration.v1.RegistrationEvent> sink)
    Register a module with streaming status updates.
    ai.pipestream.platform.registration.v1.UnregisterResponse
    unregisterModule(ai.pipestream.platform.registration.v1.UnregisterRequest request)
    Unregisters a module from Consul and, on success, emits a ModuleUnregistered OpenSearch event.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleRegistrationHandler

      public ModuleRegistrationHandler()
      Creates the handler bean. Its collaborators (Consul, repository, Apicurio, OpenSearch producer, Vert.x) are supplied by CDI field injection, and the web client is built in init().
  • Method Details

    • registerModule

      public void registerModule(ai.pipestream.platform.registration.v1.RegisterRequest request, Consumer<ai.pipestream.platform.registration.v1.RegistrationEvent> sink)
      Register a module with streaming status updates. Expects RegisterRequest with type=SERVICE_TYPE_MODULE and inline module metadata. Flow: Validate → Consul → Health → Apicurio → Database → OpenSearch. Emits each RegistrationEvent to sink as the flow progresses.
      Parameters:
      request - the module registration request
      sink - consumer that receives each RegistrationEvent as the flow progresses
    • unregisterModule

      public ai.pipestream.platform.registration.v1.UnregisterResponse unregisterModule(ai.pipestream.platform.registration.v1.UnregisterRequest request)
      Unregisters a module from Consul and, on success, emits a ModuleUnregistered OpenSearch event.
      Parameters:
      request - the unregister request identifying the module by name, host, and port
      Returns:
      the unregister response indicating success and a status message