Class Bot

    • Constructor Detail

      • Bot

        public Bot()
    • Method Detail

      • wire

        public static <R> io.reactivex.disposables.Disposable wire​(java.lang.String applicationId,
                                                                   LedgerClient ledgerClient,
                                                                   com.daml.ledger.javaapi.data.TransactionFilter transactionFilter,
                                                                   java.util.function.Function<LedgerViewFlowable.LedgerView<R>,​io.reactivex.Flowable<CommandsAndPendingSet>> bot,
                                                                   java.util.function.Function<CreatedContract,​R> transform)
        Wires the Bot logic to an existing LedgerClient instance.
        Type Parameters:
        R - The type of the result of transform.
        Parameters:
        applicationId - The application identifier that will be sent to the Ledger
        ledgerClient - The LedgerClient instance which will be wired to the bot.
        transactionFilter - A server-side filter of incoming transactions
        bot - The business logic of the bot.
        transform - A function from the arguments of a Contract on the Ledger to a more refined type R. This can be used by the developer to, for instance, discard the fields of a Contract that are not needed and save space.
        Returns:
        The subscription representing the connection.
      • wire

        public static <R> io.reactivex.disposables.Disposable wire​(java.lang.String applicationId,
                                                                   LedgerClient ledgerClient,
                                                                   com.daml.ledger.javaapi.data.TransactionFilter transactionFilter,
                                                                   java.util.function.Function<LedgerViewFlowable.LedgerView<R>,​io.reactivex.Flowable<CommandsAndPendingSet>> bot,
                                                                   java.util.function.Function<CreatedContract,​R> transform,
                                                                   io.reactivex.Scheduler scheduler)
        Wires the Bot logic to an existing LedgerClient instance.
        Type Parameters:
        R - The type of the result of transform.
        Parameters:
        applicationId - The application identifier that will be sent to the Ledger
        ledgerClient - The LedgerClient instance which will be wired to the bot.
        transactionFilter - A server-side filter of incoming transactions
        bot - The business logic of the bot.
        transform - A function from the arguments of a Contract on the Ledger to a more refined type R. This can be used by the developer to, for instance, discard the fields of a Contract that are not needed and save space.
        scheduler - The scheduler used to run the flows
        Returns:
        The subscription representing the connection.