Package org.somda.sdc.glue.consumer.sco
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart>getReports()Gets all reports received so far.TgetResponse()Gets set response message.longgetTransactionId()Gets the transaction id.List<org.somda.sdc.biceps.model.message.OperationInvokedReport.ReportPart>waitForFinalReport(Duration waitTime)Starts waiting for a final report.
-
-
-
Method Detail
-
getTransactionId
long getTransactionId()
Gets the transaction id.Shortcut of accessing
getTransactionId()ofgetResponse().- 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.
-
-