@ -65,7 +65,7 @@ import org.springframework.web.socket.handler.SessionLimitExceededException;
* @since 4 . 0
* @since 4 . 0
* /
* /
public class SubProtocolWebSocketHandler implements WebSocketHandler ,
public class SubProtocolWebSocketHandler implements WebSocketHandler ,
SubProtocolCapable , MessageHandler , SmartLifecycle , ApplicationEventPublisherAware {
SubProtocolCapable , MessageHandler , SmartLifecycle {
/ * *
/ * *
* Sessions connected to this handler use a sub - protocol . Hence we expect to
* Sessions connected to this handler use a sub - protocol . Hence we expect to
@ -97,12 +97,10 @@ public class SubProtocolWebSocketHandler implements WebSocketHandler,
private final ReentrantLock sessionCheckLock = new ReentrantLock ( ) ;
private final ReentrantLock sessionCheckLock = new ReentrantLock ( ) ;
private Object lifecycleMonitor = new Object ( ) ;
private final Object lifecycleMonitor = new Object ( ) ;
private volatile boolean running = false ;
private volatile boolean running = false ;
private ApplicationEventPublisher eventPublisher ;
public SubProtocolWebSocketHandler ( MessageChannel clientInboundChannel , SubscribableChannel clientOutboundChannel ) {
public SubProtocolWebSocketHandler ( MessageChannel clientInboundChannel , SubscribableChannel clientOutboundChannel ) {
Assert . notNull ( clientInboundChannel , "ClientInboundChannel must not be null" ) ;
Assert . notNull ( clientInboundChannel , "ClientInboundChannel must not be null" ) ;
@ -147,10 +145,6 @@ public class SubProtocolWebSocketHandler implements WebSocketHandler,
+ " to protocol '" + protocol + "', it is already mapped to handler " + replaced ) ;
+ " to protocol '" + protocol + "', it is already mapped to handler " + replaced ) ;
}
}
}
}
if ( handler instanceof ApplicationEventPublisherAware ) {
( ( ApplicationEventPublisherAware ) handler ) . setApplicationEventPublisher ( this . eventPublisher ) ;
}
}
}
/ * *
/ * *
@ -203,11 +197,6 @@ public class SubProtocolWebSocketHandler implements WebSocketHandler,
return sendBufferSizeLimit ;
return sendBufferSizeLimit ;
}
}
@Override
public void setApplicationEventPublisher ( ApplicationEventPublisher eventPublisher ) {
this . eventPublisher = eventPublisher ;
}
@Override
@Override
public boolean isAutoStartup ( ) {
public boolean isAutoStartup ( ) {
return true ;
return true ;