Class ScoTransactionImpl<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>

    • Constructor Detail

      • ScoTransactionImpl

        public ScoTransactionImpl​(T response,
                                  @Nullable
                                  Consumer<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> reportListener,
                                  org.somda.sdc.common.util.ObjectUtil objectUtil,
                                  ScoUtil scoUtil)
    • Method Detail

      • getReports

        public List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> getReports()
        Description copied from interface: ScoTransaction
        Gets all reports received so far.
        Specified by:
        getReports in interface ScoTransaction<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>
        Returns:
        Snapshot of received reports as a copy.
      • getResponse

        public T getResponse()
        Description copied from interface: ScoTransaction
        Gets set response message.
        Specified by:
        getResponse in interface ScoTransaction<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>
        Returns:
        a copy of the set response message of this ScoTransactionImpl.
      • waitForFinalReport

        public List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> waitForFinalReport​(Duration waitTime)
        Description copied from interface: ScoTransaction
        Starts waiting for a final report.

        A report is final if ScoUtil.isFinalReport(OperationInvokedReport.ReportPart) holds true.

        Specified by:
        waitForFinalReport in interface ScoTransaction<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>
        Parameters:
        waitTime - maximum wait time until this function returns.
        Returns:
        a list that holds all reports including the final one or an empty list if no final report has been received.
      • receiveIncomingReport

        public void receiveIncomingReport​(org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart report)
        Internal function to trigger reception of an incoming report.

        Notifies waiting threads.

        Parameters:
        report - the report to receive.