Issue #207 - correcting lifecycle of WebSocketSession and EndpointFunctions
# Conflicts: # jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/ConnectPromise.java # jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/io/UpgradeConnection.java
This commit is contained in:
parent
1d3c1cefbe
commit
fa635f5ecd
|
@ -176,8 +176,8 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Rem
|
|||
LOG.debug("Using RemoteEndpointFactory: {}", remoteEndpointFactory);
|
||||
|
||||
this.endpointFunctions = newEndpointFunctions(this.endpoint);
|
||||
addBean(this.endpointFunctions);
|
||||
|
||||
addManaged(this.endpointFunctions);
|
||||
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
|
|
|
@ -110,8 +110,8 @@ public class CommonEndpointFunctions<T extends Session> extends AbstractLifeCycl
|
|||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
super.doStart();
|
||||
discoverEndpointFunctions(this.endpoint);
|
||||
super.doStart();
|
||||
}
|
||||
|
||||
protected void discoverEndpointFunctions(Object endpoint)
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.eclipse.jetty.websocket.common.function;
|
|||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.eclipse.jetty.util.component.LifeCycle;
|
||||
import org.eclipse.jetty.websocket.api.extensions.Frame;
|
||||
import org.eclipse.jetty.websocket.common.CloseInfo;
|
||||
|
||||
|
@ -28,7 +29,7 @@ import org.eclipse.jetty.websocket.common.CloseInfo;
|
|||
*
|
||||
* @param <T> the Session object
|
||||
*/
|
||||
public interface EndpointFunctions<T>
|
||||
public interface EndpointFunctions<T> extends LifeCycle
|
||||
{
|
||||
void onOpen(T session);
|
||||
|
||||
|
|
Loading…
Reference in New Issue