forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(corda4): implement monitoring of state changes
Add new endpoints to corda kotlin server used to start and stop monitoring, and get/clean state changes from its internal buffer. Add reactive watchBlocksV1 that polls kotlin server and reports new transactions asynchronously. Add CordaApiClient support to VerifierClient. Add functional test for both monitoring interfaces. Update corda setup in corda-all-in-one to newer version. Closes: hyperledger-cacti#1610 Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
- Loading branch information
Showing
24 changed files
with
2,066 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...r/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
package org.hyperledger.cactus.plugin.ledger.connector.corda.server.api | ||
|
||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ClearMonitorTransactionsV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsBadRequestV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsSuccessV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeInfo | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request | ||
import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Response | ||
|
||
interface ApiPluginLedgerConnectorCordaService { | ||
|
||
fun clearMonitorTransactionsV1(clearMonitorTransactionsV1Request: ClearMonitorTransactionsV1Request?): ClearMonitorTransactionsV1Response | ||
|
||
fun deployContractJarsV1(deployContractJarsV1Request: DeployContractJarsV1Request?): DeployContractJarsSuccessV1Response | ||
|
||
fun diagnoseNodeV1(diagnoseNodeV1Request: DiagnoseNodeV1Request?): DiagnoseNodeV1Response | ||
|
||
fun getMonitorTransactionsV1(getMonitorTransactionsV1Request: GetMonitorTransactionsV1Request?): GetMonitorTransactionsV1Response | ||
|
||
fun getPrometheusMetricsV1(): kotlin.String | ||
|
||
fun invokeContractV1(invokeContractV1Request: InvokeContractV1Request?): InvokeContractV1Response | ||
|
||
fun listFlowsV1(listFlowsV1Request: ListFlowsV1Request?): ListFlowsV1Response | ||
|
||
fun networkMapV1(body: kotlin.Any?): List<NodeInfo> | ||
|
||
fun startMonitorV1(startMonitorV1Request: StartMonitorV1Request?): StartMonitorV1Response | ||
|
||
fun stopMonitorV1(stopMonitorV1Request: StopMonitorV1Request?): StopMonitorV1Response | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...er/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model | ||
|
||
import java.util.Objects | ||
import com.fasterxml.jackson.annotation.JsonProperty | ||
import javax.validation.constraints.DecimalMax | ||
import javax.validation.constraints.DecimalMin | ||
import javax.validation.constraints.Max | ||
import javax.validation.constraints.Min | ||
import javax.validation.constraints.NotNull | ||
import javax.validation.constraints.Pattern | ||
import javax.validation.constraints.Size | ||
import javax.validation.Valid | ||
|
||
/** | ||
* | ||
* @param stateFullClassName The fully qualified name of the Corda state to monitor | ||
* @param txIndexes | ||
*/ | ||
data class ClearMonitorTransactionsV1Request( | ||
|
||
@get:Size(min=1,max=1024) | ||
@field:JsonProperty("stateFullClassName", required = true) val stateFullClassName: kotlin.String, | ||
|
||
@field:JsonProperty("txIndexes") val txIndexes: kotlin.collections.List<kotlin.String>? = null | ||
) { | ||
|
||
} | ||
|
Oops, something went wrong.