32
32
import org .springframework .messaging .SubscribableChannel ;
33
33
import org .springframework .messaging .simp .SimpMessageHeaderAccessor ;
34
34
import org .springframework .messaging .simp .SimpMessageType ;
35
- import org .springframework .messaging .support .AbstractMessageChannel ;
36
35
import org .springframework .messaging .support .ChannelInterceptor ;
37
36
import org .springframework .messaging .support .ChannelInterceptorAdapter ;
37
+ import org .springframework .messaging .support .InterceptableChannel ;
38
38
import org .springframework .util .Assert ;
39
39
import org .springframework .util .CollectionUtils ;
40
40
@@ -172,8 +172,8 @@ public void start() {
172
172
}
173
173
this .clientInboundChannel .subscribe (this );
174
174
this .brokerChannel .subscribe (this );
175
- if (this .clientInboundChannel instanceof AbstractMessageChannel ) {
176
- ((AbstractMessageChannel ) this .clientInboundChannel ).addInterceptor (0 , this .unsentDisconnectInterceptor );
175
+ if (this .clientInboundChannel instanceof InterceptableChannel ) {
176
+ ((InterceptableChannel ) this .clientInboundChannel ).addInterceptor (0 , this .unsentDisconnectInterceptor );
177
177
}
178
178
startInternal ();
179
179
this .running = true ;
@@ -195,8 +195,8 @@ public void stop() {
195
195
stopInternal ();
196
196
this .clientInboundChannel .unsubscribe (this );
197
197
this .brokerChannel .unsubscribe (this );
198
- if (this .clientInboundChannel instanceof AbstractMessageChannel ) {
199
- ((AbstractMessageChannel ) this .clientInboundChannel ).removeInterceptor (this .unsentDisconnectInterceptor );
198
+ if (this .clientInboundChannel instanceof InterceptableChannel ) {
199
+ ((InterceptableChannel ) this .clientInboundChannel ).removeInterceptor (this .unsentDisconnectInterceptor );
200
200
}
201
201
this .running = false ;
202
202
if (logger .isDebugEnabled ()) {
0 commit comments