Skip to content

Commit aacab78

Browse files
committed
add Java Duration version of withResponseEntitySubscriptionTimeout
1 parent 7bd9042 commit aacab78

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

http-core/src/main/scala/org/apache/pekko/http/impl/settings/ConnectionPoolSettingsImpl.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ private[pekko] final case class ConnectionPoolSettingsImpl(
8080
copy(connectionSettings = f(connectionSettings),
8181
hostOverrides = hostOverrides.map { case (k, v) => k -> v.withUpdatedConnectionSettings(f) })
8282

83+
override def withResponseEntitySubscriptionTimeout(newValue: java.time.Duration): ConnectionPoolSettings =
84+
withResponseEntitySubscriptionTimeout(newValue.asScala)
85+
8386
/** INTERNAL API */
8487
private[http] def copyDeep(
8588
mapHostOverrides: ConnectionPoolSettings => ConnectionPoolSettings,

http-core/src/main/scala/org/apache/pekko/http/javadsl/settings/ConnectionPoolSettings.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ abstract class ConnectionPoolSettings private[pekko] () { self: ConnectionPoolSe
109109
@ApiMayChange
110110
def withResponseEntitySubscriptionTimeout(newValue: Duration): ConnectionPoolSettings
111111

112+
/**
113+
* Java API
114+
* @since 1.3.0
115+
*/
116+
def withResponseEntitySubscriptionTimeout(newValue: java.time.Duration): ConnectionPoolSettings
117+
112118
def withTransport(newValue: ClientTransport): ConnectionPoolSettings =
113119
withUpdatedConnectionSettings(_.withTransport(newValue.asScala))
114120
}

0 commit comments

Comments
 (0)