Package 

Interface StreamStartableComponent


  • 
    public interface StreamStartableComponent
    
                        

    Minimal lifecycle contract for components that can be started and stopped on demand.

    Consumers typically call start during initialization and stop when tearing down resources or responding to lifecycle events.

    • Method Summary

      Modifier and Type Method Description
      abstract Result<Unit> start() Starts the component.
      abstract Result<Unit> stop() Stops the component.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • start

         abstract Result<Unit> start()

        Starts the component.

        subscriptionManager.start()
            .onFailure { cause -> logger.e(cause) { "Unable to start monitor" } }
      • stop

         abstract Result<Unit> stop()

        Stops the component.

        subscriptionManager.stop()
            .onFailure { cause -> logger.w(cause) { "Unable to stop monitor" } }