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 java.lang.Object implements org.springframework.context.SmartLifecycleUsed to provision streams.- Since:
- 2.4.13
-
-
Constructor Summary
Constructors Constructor Description StreamAdmin(com.rabbitmq.stream.Environment env, java.util.function.Consumer<com.rabbitmq.stream.StreamCreator> callback)Construct with the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPhase()booleanisAutoStartup()booleanisRunning()voidsetAutoStartup(boolean autoStartup)Set to false to prevent automatic startup.voidsetPhase(int phase)Set the phase; default is 0.voidstart()voidstop()
-
-
-
Method Detail
-
getPhase
public int getPhase()
- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.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:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()
- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
-