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:
Joakim Erdfelt 2016-10-12 11:13:35 -07:00
parent 1d3c1cefbe
commit fa635f5ecd
3 changed files with 5 additions and 4 deletions

View File

@ -176,7 +176,7 @@ 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();
}

View File

@ -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)

View File

@ -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);