Before this change WebSocketConnectionManager delegated SmartLifecycle
methods to the client instance it contained. After this change
WebSocketClient implementations are expected to implement Lifecycle
(rather than SmartLifecycle).
The need for this is even more evident with SockJsClient, which is a
WebSocketClient implementation and contains a WebSocketTransport that
in turn contains the actual WebSocketClient. In this case
WebSocketConnectionManager as the top level container is the obvious
place to configure autostartup while Lifecycle events can be
propagated all the way down to the root WebSocketClient.
@ -46,8 +47,6 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@@ -46,8 +47,6 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@ -55,7 +54,6 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@@ -55,7 +54,6 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@ -116,16 +114,16 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@@ -116,16 +114,16 @@ public class WebSocketConnectionManager extends ConnectionManagerSupport {
@ -98,24 +99,6 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma
@@ -98,24 +99,6 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma
returnthis.taskExecutor;
}
publicvoidsetAutoStartup(booleanautoStartup){
this.autoStartup=autoStartup;
}
@Override
publicbooleanisAutoStartup(){
returnthis.autoStartup;
}
publicvoidsetPhase(intphase){
this.phase=phase;
}
@Override
publicintgetPhase(){
returnthis.phase;
}
@Override
publicbooleanisRunning(){
synchronized(this.lifecycleMonitor){
@ -157,12 +140,6 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma
@@ -157,12 +140,6 @@ public class JettyWebSocketClient extends AbstractWebSocketClient implements Sma