|
105 | 105 | import org.glassfish.grizzly.utils.Futures;
|
106 | 106 | import org.glassfish.grizzly.utils.IdleTimeoutFilter;
|
107 | 107 | import org.glassfish.grizzly.websockets.DataFrame;
|
108 |
| -import org.glassfish.grizzly.websockets.DefaultWebSocket; |
109 | 108 | import org.glassfish.grizzly.websockets.HandShake;
|
110 | 109 | import org.glassfish.grizzly.websockets.HandshakeException;
|
111 | 110 | import org.glassfish.grizzly.websockets.ProtocolHandler;
|
| 111 | +import org.glassfish.grizzly.websockets.SimpleWebSocket; |
112 | 112 | import org.glassfish.grizzly.websockets.Version;
|
113 |
| -import org.glassfish.grizzly.websockets.WebSocketEngine; |
114 |
| -import org.glassfish.grizzly.websockets.WebSocketFilter; |
| 113 | +import org.glassfish.grizzly.websockets.WebSocketClientFilter; |
| 114 | +import org.glassfish.grizzly.websockets.WebSocketHolder; |
115 | 115 | import org.glassfish.grizzly.websockets.draft06.ClosingFrame;
|
116 | 116 | import org.slf4j.Logger;
|
117 | 117 | import org.slf4j.LoggerFactory;
|
@@ -413,7 +413,7 @@ public void onTimeout(Connection connection) {
|
413 | 413 | } else {
|
414 | 414 | doDefaultTransportConfig();
|
415 | 415 | }
|
416 |
| - fcb.add(new WebSocketFilter()); |
| 416 | + fcb.add(new WebSocketClientFilter()); |
417 | 417 | clientTransport.getAsyncQueueIO().getWriter().setMaxPendingBytesPerConnection(-1);
|
418 | 418 | clientTransport.setProcessor(fcb.build());
|
419 | 419 |
|
@@ -1337,13 +1337,13 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader,
|
1337 | 1337 |
|
1338 | 1338 | final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context);
|
1339 | 1339 | context.webSocket = webSocketAdapter;
|
1340 |
| - DefaultWebSocket ws = webSocketAdapter.gWebSocket; |
| 1340 | + SimpleWebSocket ws = webSocketAdapter.gWebSocket; |
1341 | 1341 | if (context.currentState == AsyncHandler.STATE.UPGRADE) {
|
1342 | 1342 | httpHeader.setChunked(false);
|
1343 | 1343 | ws.onConnect();
|
1344 |
| - WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(), |
1345 |
| - context.protocolHandler, |
1346 |
| - ws); |
| 1344 | + WebSocketHolder.set(ctx.getConnection(), |
| 1345 | + context.protocolHandler, |
| 1346 | + ws); |
1347 | 1347 | ((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket);
|
1348 | 1348 | final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs();
|
1349 | 1349 | IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(),
|
@@ -1437,7 +1437,7 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c
|
1437 | 1437 | // ----------------------------------------------------- Private Methods
|
1438 | 1438 |
|
1439 | 1439 | private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) {
|
1440 |
| - DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler); |
| 1440 | + SimpleWebSocket ws = new SimpleWebSocket(context.protocolHandler); |
1441 | 1441 | AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig();
|
1442 | 1442 | boolean bufferFragments = true;
|
1443 | 1443 | if (config instanceof GrizzlyAsyncHttpProviderConfig) {
|
@@ -1652,7 +1652,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
|
1652 | 1652 | req.getHeaders().remove(Header.ProxyAuthenticate.toString());
|
1653 | 1653 | req.getHeaders().remove(Header.ProxyAuthorization.toString());
|
1654 | 1654 |
|
1655 |
| - String msg = null; |
| 1655 | + String msg; |
1656 | 1656 | try {
|
1657 | 1657 |
|
1658 | 1658 | if(isNTLMFirstHandShake(proxy_auth))
|
@@ -1696,7 +1696,7 @@ public boolean handleStatus(final HttpResponsePacket responsePacket,
|
1696 | 1696 |
|
1697 | 1697 | newContext.invocationStatus = tempInvocationStatus;
|
1698 | 1698 |
|
1699 |
| - String challengeHeader = null; |
| 1699 | + String challengeHeader; |
1700 | 1700 | String server = proxyServer.getHost();
|
1701 | 1701 |
|
1702 | 1702 | challengeHeader = GSSSPNEGOWrapper.generateToken(server);
|
@@ -2816,13 +2816,13 @@ public void getBytes(byte[] bytes) {
|
2816 | 2816 |
|
2817 | 2817 | private static final class GrizzlyWebSocketAdapter implements WebSocket {
|
2818 | 2818 |
|
2819 |
| - private final DefaultWebSocket gWebSocket; |
| 2819 | + private final SimpleWebSocket gWebSocket; |
2820 | 2820 | private final boolean bufferFragments;
|
2821 | 2821 |
|
2822 | 2822 | // -------------------------------------------------------- Constructors
|
2823 | 2823 |
|
2824 | 2824 |
|
2825 |
| - GrizzlyWebSocketAdapter(final DefaultWebSocket gWebSocket, |
| 2825 | + GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket, |
2826 | 2826 | final boolean bufferFragements) {
|
2827 | 2827 | this.gWebSocket = gWebSocket;
|
2828 | 2828 | this.bufferFragments = bufferFragements;
|
|
0 commit comments