Skip to content

Commit 354fad3

Browse files
committed
Changes for Grizzly 2.3.2-SNAPSHOT.
1 parent b62bd15 commit 354fad3

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@
540540
<dependency>
541541
<groupId>org.glassfish.grizzly</groupId>
542542
<artifactId>grizzly-websockets</artifactId>
543-
<version>2.2.21</version>
543+
<version>2.3.2-SNAPSHOT</version>
544544
<optional>true</optional>
545545
</dependency>
546546
</dependencies>

src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import com.ning.http.client.HttpResponseStatus;
3232
import com.ning.http.client.ListenableFuture;
3333
import com.ning.http.client.MaxRedirectException;
34-
import com.ning.http.client.Part;
3534
import com.ning.http.client.PerRequestConfig;
3635
import com.ning.http.client.ProxyServer;
3736
import com.ning.http.client.Realm;
@@ -102,13 +101,13 @@
102101
import org.glassfish.grizzly.utils.Futures;
103102
import org.glassfish.grizzly.utils.IdleTimeoutFilter;
104103
import org.glassfish.grizzly.websockets.DataFrame;
105-
import org.glassfish.grizzly.websockets.DefaultWebSocket;
106104
import org.glassfish.grizzly.websockets.HandShake;
107105
import org.glassfish.grizzly.websockets.HandshakeException;
108106
import org.glassfish.grizzly.websockets.ProtocolHandler;
107+
import org.glassfish.grizzly.websockets.SimpleWebSocket;
109108
import org.glassfish.grizzly.websockets.Version;
110-
import org.glassfish.grizzly.websockets.WebSocketEngine;
111109
import org.glassfish.grizzly.websockets.WebSocketFilter;
110+
import org.glassfish.grizzly.websockets.WebSocketHolder;
112111
import org.glassfish.grizzly.websockets.draft06.ClosingFrame;
113112
import org.slf4j.Logger;
114113
import org.slf4j.LoggerFactory;
@@ -1295,13 +1294,13 @@ protected void onHttpHeadersParsed(HttpHeader httpHeader,
12951294
context.protocolHandler.setConnection(ctx.getConnection());
12961295
final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context);
12971296
context.webSocket = webSocketAdapter;
1298-
DefaultWebSocket ws = webSocketAdapter.gWebSocket;
1297+
SimpleWebSocket ws = webSocketAdapter.gWebSocket;
12991298
if (context.currentState == AsyncHandler.STATE.UPGRADE) {
13001299
httpHeader.setChunked(false);
13011300
ws.onConnect();
1302-
WebSocketEngine.getEngine().setWebSocketHolder(ctx.getConnection(),
1303-
context.protocolHandler,
1304-
ws);
1301+
WebSocketHolder.set(ctx.getConnection(),
1302+
context.protocolHandler,
1303+
ws);
13051304
((WebSocketUpgradeHandler) context.handler).onSuccess(context.webSocket);
13061305
final int wsTimeout = context.provider.clientConfig.getWebSocketIdleTimeoutInMs();
13071306
IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(),
@@ -1388,7 +1387,7 @@ protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext c
13881387
// ----------------------------------------------------- Private Methods
13891388

13901389
private static GrizzlyWebSocketAdapter createWebSocketAdapter(final HttpTransactionContext context) {
1391-
DefaultWebSocket ws = new DefaultWebSocket(context.protocolHandler);
1390+
SimpleWebSocket ws = new SimpleWebSocket(context.protocolHandler);
13921391
AsyncHttpProviderConfig config = context.provider.clientConfig.getAsyncHttpProviderConfig();
13931392
boolean bufferFragments = true;
13941393
if (config instanceof GrizzlyAsyncHttpProviderConfig) {
@@ -2576,13 +2575,13 @@ public void getBytes(byte[] bytes) {
25762575

25772576
private static final class GrizzlyWebSocketAdapter implements WebSocket {
25782577

2579-
final DefaultWebSocket gWebSocket;
2578+
final SimpleWebSocket gWebSocket;
25802579
final boolean bufferFragments;
25812580

25822581
// -------------------------------------------------------- Constructors
25832582

25842583

2585-
GrizzlyWebSocketAdapter(final DefaultWebSocket gWebSocket,
2584+
GrizzlyWebSocketAdapter(final SimpleWebSocket gWebSocket,
25862585
final boolean bufferFragments) {
25872586
this.gWebSocket = gWebSocket;
25882587
this.bufferFragments = bufferFragments;

0 commit comments

Comments
 (0)