Issue #5850 - set the UpgradeRequest in the Javax FrameHandlerFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
af3cce85a7
commit
69facceec3
|
@ -16,8 +16,6 @@ package org.eclipse.jetty.websocket.javax.client.internal;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|
||||||
import org.eclipse.jetty.client.HttpResponse;
|
|
||||||
import org.eclipse.jetty.io.EndPoint;
|
|
||||||
import org.eclipse.jetty.websocket.core.FrameHandler;
|
import org.eclipse.jetty.websocket.core.FrameHandler;
|
||||||
import org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest;
|
import org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest;
|
||||||
import org.eclipse.jetty.websocket.core.client.WebSocketCoreClient;
|
import org.eclipse.jetty.websocket.core.client.WebSocketCoreClient;
|
||||||
|
@ -34,13 +32,6 @@ public class JavaxClientUpgradeRequest extends CoreClientUpgradeRequest implemen
|
||||||
frameHandler = clientContainer.newFrameHandler(websocketPojo, this);
|
frameHandler = clientContainer.newFrameHandler(websocketPojo, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void upgrade(HttpResponse response, EndPoint endPoint)
|
|
||||||
{
|
|
||||||
frameHandler.setUpgradeRequest(this);
|
|
||||||
super.upgrade(response, endPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FrameHandler getFrameHandler()
|
public FrameHandler getFrameHandler()
|
||||||
{
|
{
|
||||||
|
|
|
@ -165,13 +165,16 @@ public abstract class JavaxWebSocketFrameHandlerFactory
|
||||||
errorHandle = InvokerUtils.bindTo(errorHandle, endpoint);
|
errorHandle = InvokerUtils.bindTo(errorHandle, endpoint);
|
||||||
pongHandle = InvokerUtils.bindTo(pongHandle, endpoint);
|
pongHandle = InvokerUtils.bindTo(pongHandle, endpoint);
|
||||||
|
|
||||||
return new JavaxWebSocketFrameHandler(
|
JavaxWebSocketFrameHandler frameHandler = new JavaxWebSocketFrameHandler(
|
||||||
container,
|
container,
|
||||||
endpoint,
|
endpoint,
|
||||||
openHandle, closeHandle, errorHandle,
|
openHandle, closeHandle, errorHandle,
|
||||||
textMetadata, binaryMetadata,
|
textMetadata, binaryMetadata,
|
||||||
pongHandle,
|
pongHandle,
|
||||||
config);
|
config);
|
||||||
|
|
||||||
|
frameHandler.setUpgradeRequest(upgradeRequest);
|
||||||
|
return frameHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MessageSink createMessageSink(JavaxWebSocketSession session, JavaxWebSocketMessageMetadata msgMetadata)
|
public static MessageSink createMessageSink(JavaxWebSocketSession session, JavaxWebSocketMessageMetadata msgMetadata)
|
||||||
|
|
Loading…
Reference in New Issue