|
1 | 1 | package com.pusher.client.connection.websocket; |
2 | 2 |
|
3 | | -import com.google.gson.Gson; |
4 | | -import com.pusher.client.connection.ConnectionEventListener; |
5 | | -import com.pusher.client.connection.ConnectionState; |
6 | | -import com.pusher.client.connection.ConnectionStateChange; |
7 | | -import com.pusher.client.connection.impl.InternalConnection; |
8 | | -import com.pusher.client.util.Factory; |
9 | | - |
10 | | -import org.java_websocket.client.WebSocketClient; |
11 | | -import org.java_websocket.handshake.ServerHandshake; |
12 | | -import org.slf4j.Logger; |
13 | | -import org.slf4j.LoggerFactory; |
14 | | - |
15 | 3 | import java.net.Proxy; |
16 | 4 | import java.net.URI; |
17 | 5 | import java.net.URISyntaxException; |
18 | 6 | import java.util.Collections; |
| 7 | +import java.util.HashMap; |
19 | 8 | import java.util.HashSet; |
20 | 9 | import java.util.Map; |
21 | 10 | import java.util.Set; |
|
25 | 14 |
|
26 | 15 | import javax.net.ssl.SSLException; |
27 | 16 |
|
| 17 | +import org.java_websocket.client.WebSocketClient; |
| 18 | +import org.java_websocket.handshake.ServerHandshake; |
| 19 | +import org.slf4j.Logger; |
| 20 | +import org.slf4j.LoggerFactory; |
| 21 | + |
| 22 | +import com.google.gson.Gson; |
| 23 | + |
| 24 | +import com.pusher.client.connection.ConnectionEventListener; |
| 25 | +import com.pusher.client.connection.ConnectionState; |
| 26 | +import com.pusher.client.connection.ConnectionStateChange; |
| 27 | +import com.pusher.client.connection.impl.InternalConnection; |
| 28 | +import com.pusher.client.util.Factory; |
| 29 | + |
28 | 30 | public class WebSocketConnection implements InternalConnection, WebSocketListener { |
29 | 31 | private static final Logger log = LoggerFactory.getLogger(WebSocketConnection.class); |
30 | 32 | private static final Gson GSON = new Gson(); |
@@ -54,7 +56,7 @@ public WebSocketConnection( |
54 | 56 | this.factory = factory; |
55 | 57 |
|
56 | 58 | for (final ConnectionState state : ConnectionState.values()) { |
57 | | - eventListeners.put(state, Collections.newSetFromMap(new ConcurrentHashMap<ConnectionEventListener, Boolean>())); |
| 59 | + eventListeners.put(state, Collections.newSetFromMap(new HashMap<ConnectionEventListener, Boolean>())); |
58 | 60 | } |
59 | 61 | } |
60 | 62 |
|
|
0 commit comments