Skip to content

Commit 86af173

Browse files
committed
Merge branch 'chore/SDKJAVA-245' into 'main'
chore: Rework SDK architecture Closes SDKJAVA-245 See merge request dracoon/sdks-public/sdk-java!22
2 parents 16df412 + ae63460 commit 86af173

File tree

162 files changed

+2798
-1768
lines changed

Some content is hidden

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

162 files changed

+2798
-1768
lines changed

src/main/java/com/dracoon/sdk/DracoonClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ public URL getServerUrl() {
13671367
* - Server URL (mandatory): {@link #Builder(URL)}<br>
13681368
* - Logger: {@link #log(Log)}<br>
13691369
* - Authorization data: {@link #auth(DracoonAuth)}<br>
1370-
* - Encryption password: {@link #encryptionPassword(String)}<br>
1370+
* - Encryption password: {@link #encryptionPassword(char[])}<br>
13711371
* - HTTP configuration: {@link #httpConfig(DracoonHttpConfig)}
13721372
*/
13731373
public static class Builder {

src/main/java/com/dracoon/sdk/DracoonHttpConfig.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* - HTTP connection timeout (Default: 15 seconds)<br>
2020
* - HTTP read timeout (Default: 15 seconds)<br>
2121
* - HTTP write timeout (Default: 15 seconds)<br>
22-
* - Upload/download chunk size (Default: 2 MiB)<br>
22+
* - Upload/download chunk size (Default: 5 MiB, Minimum: 5MiB)<br>
2323
* - Proxy server enabled (Default: false)<br>
2424
* - Proxy server address (Default: null)<br>
2525
* - Proxy server port (Default: null)<br>
@@ -28,13 +28,15 @@
2828
*/
2929
public class DracoonHttpConfig {
3030

31+
private static final int MIN_CHUNK_SIZE = (5 * DracoonConstants.MIB) / DracoonConstants.KIB;
32+
3133
private String mUserAgent;
3234
private boolean mRetryEnabled;
3335
private boolean mRateLimitingEnabled;
3436
private int mConnectTimeout;
3537
private int mReadTimeout;
3638
private int mWriteTimeout;
37-
private int mChunkSize;
39+
private int mChunkSize = MIN_CHUNK_SIZE;
3840
private boolean mProxyEnabled = false;
3941
private InetAddress mProxyAddress;
4042
private Integer mProxyPort;
@@ -52,7 +54,6 @@ public DracoonHttpConfig() {
5254
mConnectTimeout = 15;
5355
mReadTimeout = 15;
5456
mWriteTimeout = 15;
55-
mChunkSize = (2 * DracoonConstants.MIB) / DracoonConstants.KIB;
5657
}
5758

5859
/**
@@ -179,7 +180,11 @@ public int getChunkSize() {
179180
* @param chunkSize The upload/download chunk size.
180181
*/
181182
public void setChunkSize(int chunkSize) {
182-
mChunkSize = chunkSize;
183+
if (chunkSize > MIN_CHUNK_SIZE) {
184+
mChunkSize = chunkSize;
185+
} else {
186+
mChunkSize = MIN_CHUNK_SIZE;
187+
}
183188
}
184189

185190
/**
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.dracoon.sdk.internal;
2+
3+
import java.lang.annotation.Retention;
4+
import java.lang.annotation.RetentionPolicy;
5+
6+
@Retention(RetentionPolicy.RUNTIME)
7+
public @interface ClientImpl {
8+
Class<?> value();
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.dracoon.sdk.internal;
2+
3+
import java.lang.annotation.Retention;
4+
import java.lang.annotation.RetentionPolicy;
5+
6+
@Retention(RetentionPolicy.RUNTIME)
7+
public @interface ClientMethodImpl {
8+
String value() default "";
9+
}

0 commit comments

Comments
 (0)