Class StreamAdmin

java.lang.Object
org.springframework.rabbit.stream.support.StreamAdmin
All Implemented Interfaces:
Lifecycle, Phased, SmartLifecycle

public class StreamAdmin extends Object implements SmartLifecycle
Used to provision streams.
Since:
2.4.13
Author:
Gary Russell
  • Constructor Details

    • StreamAdmin

      public StreamAdmin(com.rabbitmq.stream.Environment env, Consumer<com.rabbitmq.stream.StreamCreator> callback)
      Construct with the provided parameters.
      Parameters:
      env - the environment.
      callback - the callback to receive the StreamCreator.
  • Method Details

    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface Phased
      Specified by:
      getPhase in interface SmartLifecycle
    • setPhase

      public void setPhase(int phase)
      Set the phase; default is 0.
      Parameters:
      phase - the phase.
    • setAutoStartup

      public void setAutoStartup(boolean autoStartup)
      Set to false to prevent automatic startup.
      Parameters:
      autoStartup - the autoStartup.
    • start

      public void start()
      Specified by:
      start in interface Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface SmartLifecycle