Skip to content

Commit 3bb5be5

Browse files
committed
feat: allow to modify the underlying okHttpClient from the BoxApiConnection subclasses
Refs: #1271
1 parent 6ea70f7 commit 3bb5be5

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

src/main/java/com/box/sdk/BoxCCGAPIConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ private BoxCCGAPIConnection(BoxConfig boxConfig) {
4141
super(boxConfig);
4242
}
4343

44+
/**
45+
* {@inheritDoc}
46+
*/
47+
@Override
48+
protected OkHttpClient.Builder modifyHttpClientBuilder(OkHttpClient.Builder httpClientBuilder) {
49+
return super.modifyHttpClientBuilder(httpClientBuilder);
50+
}
51+
4452
/**
4553
* Creates connection that authenticates as a Service Account
4654
*

src/main/java/com/box/sdk/BoxDeveloperEditionAPIConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ public BoxDeveloperEditionAPIConnection(String entityId, DeveloperEditionEntityT
108108
boxConfig.getJWTEncryptionPreferences(), accessTokenCache);
109109
}
110110

111+
/**
112+
* {@inheritDoc}
113+
*/
114+
@Override
115+
protected OkHttpClient.Builder modifyHttpClientBuilder(OkHttpClient.Builder httpClientBuilder) {
116+
return super.modifyHttpClientBuilder(httpClientBuilder);
117+
}
118+
111119
/**
112120
* Creates a new Box Developer Edition connection with enterprise token leveraging an access token cache.
113121
*

src/main/java/com/box/sdk/BoxTransactionalAPIConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ public BoxTransactionalAPIConnection(String accessToken) {
2727
super.setAutoRefresh(false);
2828
}
2929

30+
/**
31+
* {@inheritDoc}
32+
*/
33+
@Override
34+
protected OkHttpClient.Builder modifyHttpClientBuilder(OkHttpClient.Builder httpClientBuilder) {
35+
return super.modifyHttpClientBuilder(httpClientBuilder);
36+
}
37+
3038
/**
3139
* Request a scoped transactional token.
3240
*

src/main/java/com/box/sdk/SharedLinkAPIConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ public SharedLinkAPIConnection(BoxAPIConnection connection, String sharedLink, S
2424
this.sharedLinkPassword = sharedLinkPassword;
2525
}
2626

27+
/**
28+
* {@inheritDoc}
29+
*/
30+
@Override
31+
protected OkHttpClient.Builder modifyHttpClientBuilder(OkHttpClient.Builder httpClientBuilder) {
32+
return super.modifyHttpClientBuilder(httpClientBuilder);
33+
}
34+
2735
@Override
2836
public long getExpires() {
2937
return this.wrappedConnection.getExpires();

0 commit comments

Comments
 (0)