Skip to content

Commit 710eefe

Browse files
committed
Improve Naming
1 parent c1157c9 commit 710eefe

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

cloudplatform/connectivity-apache-httpclient5/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/ConnectionPoolManagerProviders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public ConnectionPoolManagerProvider byDestinationName()
238238
}
239239

240240
@Nonnull
241-
public ConnectionPoolManagerProvider byIndicatedBehalfOf()
241+
public ConnectionPoolManagerProvider byOnBehalfOf()
242242
{
243243
return by(destination -> {
244244
// Check if the destination has any OnBehalfOf indicators in its custom header providers

cloudplatform/connectivity-apache-httpclient5/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/ConnectionPoolManagerProvidersTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ void testFunctionalInterfaceCanBeUsedWithLambda()
249249
}
250250

251251
@Test
252-
void testCachedByIndicatedBehalfOfWithCurrentTenantHeaderProvider()
252+
void testCachedByOnBehalfOfWithCurrentTenantHeaderProvider()
253253
{
254-
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf();
254+
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byOnBehalfOf();
255255

256256
// Create a header provider that indicates NAMED_USER_CURRENT_TENANT
257257
final DestinationHeaderProvider namedUserProvider =
@@ -286,9 +286,9 @@ void testCachedByIndicatedBehalfOfWithCurrentTenantHeaderProvider()
286286
}
287287

288288
@Test
289-
void testCachedByIndicatedBehalfOfWithTechnicalUserCurrentTenant()
289+
void testCachedByOnBehalfOfWithTechnicalUserCurrentTenant()
290290
{
291-
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf();
291+
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byOnBehalfOf();
292292

293293
final DefaultHttpDestination dest =
294294
DefaultHttpDestination
@@ -311,9 +311,9 @@ void testCachedByIndicatedBehalfOfWithTechnicalUserCurrentTenant()
311311
}
312312

313313
@Test
314-
void testCachedByIndicatedBehalfOfWithProviderUserSharesAcrossTenants()
314+
void testCachedByOnBehalfOfWithProviderUserSharesAcrossTenants()
315315
{
316-
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf();
316+
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byOnBehalfOf();
317317

318318
// Create a header provider that indicates TECHNICAL_USER_PROVIDER (not current tenant)
319319
final DefaultHttpDestination dest =
@@ -336,9 +336,9 @@ void testCachedByIndicatedBehalfOfWithProviderUserSharesAcrossTenants()
336336
}
337337

338338
@Test
339-
void testCachedByIndicatedBehalfOfWithNoHeaderProvider()
339+
void testCachedByOnBehalfOfWithNoHeaderProvider()
340340
{
341-
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf();
341+
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byOnBehalfOf();
342342

343343
// Destination without any header provider
344344
final DefaultHttpDestination dest = DefaultHttpDestination.builder("http://example.com").build();
@@ -357,9 +357,9 @@ void testCachedByIndicatedBehalfOfWithNoHeaderProvider()
357357
}
358358

359359
@Test
360-
void testCachedByIndicatedBehalfOfWithNonDefaultHttpDestination()
360+
void testCachedByOnBehalfOfWithNonDefaultHttpDestination()
361361
{
362-
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf();
362+
final ConnectionPoolManagerProvider provider = ConnectionPoolManagerProviders.cached().byOnBehalfOf();
363363

364364
// Non-DefaultHttpDestination should return null key and create new manager each time
365365
final HttpDestinationProperties nonDefaultDest = DefaultHttpDestination.builder("http://example.com").build();

release_notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
```java
2020
ApacheHttpClient5Factory factory = new ApacheHttpClient5FactoryBuilder()
2121
.connectionPoolManagerProvider(ConnectionPoolManagerProviders.noCache()) // new API (default behavior)
22-
.connectionPoolManagerProvider(ConnectionPoolManagerProviders.cached().byIndicatedBehalfOf()) // new API
22+
.connectionPoolManagerProvider(ConnectionPoolManagerProviders.cached().byOnBehalfOf()) // new API
2323
.build();
2424
```
25-
Available caching strategies include `byCurrentTenant()`, `byDestinationName()`, `byIndicatedBehalfOf()`, and custom key extractors via `by(Function)`.
26-
The `byIndicatedBehalfOf()` strategy intelligently determines tenant isolation requirements based on the destination's `OnBehalfOf` indication.
25+
Available caching strategies include `byCurrentTenant()`, `byDestinationName()`, `byOnBehalfOf()`, and custom key extractors via `by(Function)`.
26+
The `byOnBehalfOf()` strategy intelligently determines tenant isolation requirements based on the destination's `OnBehalfOf` indication.
2727

2828
### 📈 Improvements
2929

0 commit comments

Comments
 (0)