addFactory
fun addFactory(identifierPrefix: String, factory: suspend (identifierPrefix: String) -> SecureArea?): SecureAreaRepository.Builder
Adds a Secure Area factory that can be used for Secure Areas where it's possible to have multiple instances.
For example for a CloudSecureArea
the URL of the server is part of the identifier e.g. CloudSecureArea?id=SOME_UNIQUE_ID&url=https://csa.example.com/server
. An application can use this method to register a factory for establishing a connection to the requested URL and configure the instance as needed. Key to the map is Secure Area identifier prefix of the Secure Area identifier up until the '?' character.
Return
the builder.
Parameters
identifierPrefix
part of the identifier before '?' character for the secure areas created by the factory
factory
a function to create a new Secure Area with the requested identifier.