Skip to content

Commit f5058df

Browse files
committed
generate clients
1 parent a854a24 commit f5058df

File tree

320 files changed

+22947
-11442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+22947
-11442
lines changed

clients/algo/docs/rest-api/migration-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s
2222
<dependency>
2323
<groupId>io.github.binance</groupId>
2424
<artifactId>binance-algo</artifactId>
25-
<version>1.2.0</version>
25+
<version>1.2.1</version>
2626
</dependency>
2727
```
2828

@@ -91,7 +91,7 @@ by:
9191
<dependency>
9292
<groupId>io.github.binance</groupId>
9393
<artifactId>binance-algo</artifactId>
94-
<version>1.2.0</version>
94+
<version>1.2.1</version>
9595
</dependency>
9696
```
9797

clients/c2c/docs/rest-api/migration-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s
2222
<dependency>
2323
<groupId>io.github.binance</groupId>
2424
<artifactId>binance-c2c</artifactId>
25-
<version>1.2.0</version>
25+
<version>1.2.1</version>
2626
</dependency>
2727
```
2828

@@ -91,7 +91,7 @@ by:
9191
<dependency>
9292
<groupId>io.github.binance</groupId>
9393
<artifactId>binance-c2c</artifactId>
94-
<version>1.2.0</version>
94+
<version>1.2.1</version>
9595
</dependency>
9696
```
9797

clients/common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
<artifactId>binance-common</artifactId>
1212
<name>common</name>
13-
<version>2.0.1</version>
13+
<version>2.1.0</version>
1414
<packaging>jar</packaging>
1515
</project>

clients/common/src/main/java/com/binance/connector/client/common/websocket/adapter/stream/StreamConnectionWrapper.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ public class StreamConnectionWrapper extends ConnectionWrapper
3232
private final HashMap<String, List<StreamBlockingQueue<String>>> subscriptions =
3333
new HashMap<>();
3434

35+
private StreamResponse defaultStreamResponse = new StreamResponse();
36+
37+
private Boolean isRaw = false;
38+
39+
private static String DEFAULT_QUEUE = "DEFAULT";
40+
3541
public StreamConnectionWrapper(WebSocketClientConfiguration configuration, Gson json) {
3642
super(configuration, json);
3743
}
@@ -45,6 +51,12 @@ public StreamConnectionWrapper(
4551
super(configuration, webSocketClient);
4652
}
4753

54+
public StreamResponse subscribeRaw(RequestWrapperDTO<Set<String>, Object> requestWrapperDTO) {
55+
this.innerSend(requestWrapperDTO);
56+
this.isRaw = true;
57+
return defaultStreamResponse;
58+
}
59+
4860
public Map<String, StreamBlockingQueue<String>> subscribe(
4961
RequestWrapperDTO<Set<String>, Object> requestWrapperDTO) {
5062
HashMap<String, StreamBlockingQueue<String>> queueMap = new HashMap<>();
@@ -92,6 +104,10 @@ public void unsubscribe(StreamBlockingQueue queue) {
92104

93105
@Override
94106
public void onWebSocketText(String message) {
107+
if (isRaw) {
108+
this.defaultStreamResponse.produce(message);
109+
return;
110+
}
95111
try {
96112
JsonElement root = JsonParser.parseString(message);
97113
JsonObject obj = root.getAsJsonObject();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.binance.connector.client.common.websocket.adapter.stream;
2+
3+
import java.util.function.Consumer;
4+
5+
public class StreamResponse {
6+
private Consumer<String> onMessage;
7+
8+
public void onMessage(Consumer<String> callback) {
9+
this.onMessage = callback;
10+
}
11+
12+
public void produce(String item) {
13+
if (onMessage != null) {
14+
onMessage.accept(item);
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)