Interface ScoTransaction<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>

Type Parameters:
T - Type of the invocation response message.
All Known Implementing Classes:
ScoTransactionImpl

public interface ScoTransaction<T extends org.somda.sdc.biceps.model.message.AbstractSetResponse>
Definition of an SDC transaction to track incoming operation invoked report parts.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart>
    Gets all reports received so far.
    Gets set response message.
    long
    Gets the transaction id.
    List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart>
    Starts waiting for a final report.
  • Method Details

    • getTransactionId

      long getTransactionId()
      Gets the transaction id.

      Shortcut of accessing getTransactionId() of getResponse().

      Returns:
      the transaction id of this ScoTransactionImpl.
    • getReports

      List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> getReports()
      Gets all reports received so far.
      Returns:
      Snapshot of received reports as a copy.
    • getResponse

      T getResponse()
      Gets set response message.
      Returns:
      a copy of the set response message of this ScoTransactionImpl.
    • waitForFinalReport

      List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart> waitForFinalReport(Duration waitTime)
      Starts waiting for a final report.

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

      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.