Class PoolConnectionWrapper
java.lang.Object
com.binance.connector.client.common.websocket.adapter.PoolConnectionWrapper
- All Implemented Interfaces:
ConnectionInterface
-
Constructor Summary
ConstructorsConstructorDescriptionPoolConnectionWrapper
(WebSocketClientConfiguration clientConfiguration) PoolConnectionWrapper
(WebSocketClientConfiguration clientConfiguration, com.google.gson.Gson gson) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
boolean
void
send
(ApiRequestWrapperDTO request) void
send
(RequestWrapperDTO request) void
setUserAgent
(String userAgent)
-
Constructor Details
-
PoolConnectionWrapper
-
PoolConnectionWrapper
public PoolConnectionWrapper(WebSocketClientConfiguration clientConfiguration, com.google.gson.Gson gson)
-
-
Method Details
-
connect
public void connect()- Specified by:
connect
in interfaceConnectionInterface
-
send
- Specified by:
send
in interfaceConnectionInterface
- Throws:
InterruptedException
-
send
- Specified by:
send
in interfaceConnectionInterface
- Throws:
InterruptedException
-
getConnection
- Returns:
- the next connection from the pool, using round-robin
-
setUserAgent
- Specified by:
setUserAgent
in interfaceConnectionInterface
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceConnectionInterface
-