Class StreamAdmin

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

public class StreamAdmin extends Object implements org.springframework.context.SmartLifecycle
Used to provision streams.
Since:
2.4.13
  • Field Summary

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamAdmin(com.rabbitmq.stream.Environment env, Consumer<com.rabbitmq.stream.StreamCreator> callback)
    Construct with the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    boolean
     
    void
    setAutoStartup(boolean autoStartup)
    Set to false to prevent automatic startup.
    void
    setPhase(int phase)
    Set the phase; default is 0.
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.SmartLifecycle

    stop
  • 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 org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.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 org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle