Class AbstractStompSessionManager
java.lang.Object
org.springframework.integration.stomp.AbstractStompSessionManager
- All Implemented Interfaces:
- Aware,- BeanNameAware,- DisposableBean,- ApplicationEventPublisherAware,- Lifecycle,- Phased,- SmartLifecycle,- StompSessionManager
- Direct Known Subclasses:
- ReactorNettyTcpStompSessionManager,- WebSocketStompSessionManager
public abstract class AbstractStompSessionManager
extends Object
implements StompSessionManager, ApplicationEventPublisherAware, SmartLifecycle, DisposableBean, BeanNameAware
Base 
StompSessionManager implementation to manage a single StompSession
 over its ListenableFuture from the target implementation of this class.
 
 The connection to the StompSession is made during start().
 
 The stop() lifecycle method manages StompSession.disconnect().
 
 The connect(StompSessionHandler) and disconnect(StompSessionHandler) method
 implementations populate/remove the provided StompSessionHandler to/from an internal
 AbstractStompSessionManager.CompositeStompSessionHandler, which delegates all operations
 to the provided StompSessionHandlers.
 This AbstractStompSessionManager.CompositeStompSessionHandler is used for the
 StompSession connection.
- Since:
- 4.2
- Author:
- Artem Bilan, Gary Russell
- 
Field SummaryFieldsFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidconnect(StompSessionHandler handler) voiddestroy()voiddisconnect(StompSessionHandler handler) protected abstract CompletableFuture<StompSession>doConnect(StompSessionHandler handler) protected StompHeadersintgetPhase()longbooleanbooleanbooleanbooleanvoidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetAutoReceipt(boolean autoReceipt) voidsetAutoStartup(boolean autoStartup) voidsetBeanName(String name) voidsetConnectHeaders(StompHeaders connectHeaders) voidsetPhase(int phase) voidsetRecoveryInterval(int recoveryInterval) Specify a reconnect interval in milliseconds in case of lost connection.voidstart()voidstop()toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecyclestop
- 
Field Details- 
logger
- 
stompClient
 
- 
- 
Constructor Details- 
AbstractStompSessionManager
 
- 
- 
Method Details- 
setConnectHeaders
- 
setAutoReceiptpublic void setAutoReceipt(boolean autoReceipt) 
- 
isAutoReceiptEnabledpublic boolean isAutoReceiptEnabled()- Specified by:
- isAutoReceiptEnabledin interface- StompSessionManager
 
- 
isConnectedpublic boolean isConnected()- Specified by:
- isConnectedin interface- StompSessionManager
 
- 
setApplicationEventPublisher- Specified by:
- setApplicationEventPublisherin interface- ApplicationEventPublisherAware
 
- 
setBeanName- Specified by:
- setBeanNamein interface- BeanNameAware
 
- 
setRecoveryIntervalpublic void setRecoveryInterval(int recoveryInterval) Specify a reconnect interval in milliseconds in case of lost connection.- Parameters:
- recoveryInterval- the reconnect interval in milliseconds in case of lost connection.
- Since:
- 4.2.2
 
- 
setAutoStartuppublic void setAutoStartup(boolean autoStartup) 
- 
setPhasepublic void setPhase(int phase) 
- 
getRecoveryIntervalpublic long getRecoveryInterval()
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
- 
isRunningpublic boolean isRunning()
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
 
- 
startpublic void start()
- 
stoppublic void stop()
- 
connect- Specified by:
- connectin interface- StompSessionManager
 
- 
disconnect- Specified by:
- disconnectin interface- StompSessionManager
 
- 
getConnectHeaders
- 
toString
- 
doConnect
 
-