Class StreamConnectionPoolWrapper
java.lang.Object
com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionPoolWrapper
- All Implemented Interfaces:
StreamConnectionInterface
-
Constructor Summary
ConstructorsConstructorDescriptionStreamConnectionPoolWrapper
(WebSocketClientConfiguration clientConfiguration) StreamConnectionPoolWrapper
(WebSocketClientConfiguration clientConfiguration, com.google.gson.Gson gson) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
getConnection
(String identifier) boolean
void
setUserAgent
(String userAgent) subscribe
(RequestWrapperDTO<Set<String>, Object> requestWrapperDTO) void
unsubscribe
(StreamBlockingQueue queue) void
-
Constructor Details
-
StreamConnectionPoolWrapper
-
StreamConnectionPoolWrapper
public StreamConnectionPoolWrapper(WebSocketClientConfiguration clientConfiguration, com.google.gson.Gson gson)
-
-
Method Details
-
connect
public void connect()- Specified by:
connect
in interfaceStreamConnectionInterface
-
subscribe
public Map<String,StreamBlockingQueue<String>> subscribe(RequestWrapperDTO<Set<String>, Object> requestWrapperDTO) - Specified by:
subscribe
in interfaceStreamConnectionInterface
-
unsubscribe
- Specified by:
unsubscribe
in interfaceStreamConnectionInterface
-
unsubscribe
- Specified by:
unsubscribe
in interfaceStreamConnectionInterface
-
getConnection
-
getConnection
- Returns:
- the next connection from the pool, using round-robin
-
setUserAgent
- Specified by:
setUserAgent
in interfaceStreamConnectionInterface
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceStreamConnectionInterface
-