fromConnectionMethod
fun fromConnectionMethod(context: Context, connectionMethod: MdocConnectionMethod, role: DataTransport.Role, options: DataTransportOptions): DataTransport
Creates a new DataTransport-derived instance for the given type of MdocConnectionMethod.
Return
A DataTransport-derived instance configured with the given options.
Parameters
context
application context.
connectionMethod
the MdocConnectionMethod to use.
role
whether the transport will be used by the mdoc or mdoc reader.
options
options for configuring the created instance.
Throws
if the connection-method has invalid options specified.