Class StreamConnectionWrapper
java.lang.Object
com.binance.connector.client.common.websocket.adapter.ConnectionWrapper
com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionWrapper
- All Implemented Interfaces:
ConnectionInterface
,StreamConnectionInterface
,org.eclipse.jetty.websocket.api.WebSocketConnectionListener
,org.eclipse.jetty.websocket.api.WebSocketListener
-
Field Summary
Fields inherited from class com.binance.connector.client.common.websocket.adapter.ConnectionWrapper
oldSession, pendingRequest, session, WAIT_TIME
-
Constructor Summary
ConstructorsConstructorDescriptionStreamConnectionWrapper
(WebSocketClientConfiguration configuration) StreamConnectionWrapper
(WebSocketClientConfiguration configuration, com.google.gson.Gson json) StreamConnectionWrapper
(WebSocketClientConfiguration configuration, org.eclipse.jetty.websocket.client.WebSocketClient webSocketClient) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterConnect
(org.eclipse.jetty.websocket.api.Session session) protected void
void
onWebSocketText
(String message) subscribe
(RequestWrapperDTO<Set<String>, Object> requestWrapperDTO) void
unsubscribe
(StreamBlockingQueue queue) void
unsubscribe
(StreamBlockingQueueWrapper blockingQueueWrapper) Methods inherited from class com.binance.connector.client.common.websocket.adapter.ConnectionWrapper
canReconnect, connect, connect, getLogonConsumer, getPendingRequest, getTimestamp, getUri, getUserAgent, innerSend, isConnected, isPendingReconnect, isReady, logOn, onWebSocketClose, onWebSocketConnect, onWebSocketError, onWebSocketPing, send, send, send, sendForStream, setPendingReconnect, setReady, setUserAgent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.binance.connector.client.common.websocket.adapter.stream.StreamConnectionInterface
connect, isConnected, setUserAgent
Methods inherited from interface org.eclipse.jetty.websocket.api.WebSocketListener
onWebSocketBinary
-
Constructor Details
-
StreamConnectionWrapper
public StreamConnectionWrapper(WebSocketClientConfiguration configuration, com.google.gson.Gson json) -
StreamConnectionWrapper
-
StreamConnectionWrapper
public StreamConnectionWrapper(WebSocketClientConfiguration configuration, org.eclipse.jetty.websocket.client.WebSocketClient webSocketClient)
-
-
Method Details
-
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
-
onWebSocketText
- Specified by:
onWebSocketText
in interfaceorg.eclipse.jetty.websocket.api.WebSocketListener
- Overrides:
onWebSocketText
in classConnectionWrapper
-
beforeConnect
protected void beforeConnect()- Overrides:
beforeConnect
in classConnectionWrapper
-
afterConnect
protected void afterConnect(org.eclipse.jetty.websocket.api.Session session) - Overrides:
afterConnect
in classConnectionWrapper
-