Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Mobile 2.8
-
None
-
1
Description
As noted in this forum post:
https://forums.couchbase.com/t/kotlin-extensions-docs-fix/33880
Our documentation does not demonstrate one of the neatest features of the extension package:
The docs also allude to another potential feature of these extension functions, which is
overriding the receiver’s values with the passed parameters
But none of the examples actually show the API being used this way, always calling the API from the *Factory variables, which are null and wouldn’t have any receiver values to override.
The idea is that you can do something like this:
val l1 = URLEndpointListenerConfigurationFactory.create(
|
networkInterface="en0",
|
port=8080)
|
val l2 = l1.create(port=8081)
|
l1 is a configuration for a listener that will listen on port 8080, on interface "en0". {l2}} is a configuration for a listener that will listen on port 8081, on the same interface.