-
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: help deserialize marshaled flow result to intended target type
- Loading branch information
1 parent
83d2813
commit 302d0fe
Showing
8 changed files
with
64 additions
and
19 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
2 changes: 1 addition & 1 deletion
2
...client/src/main/kotlin/com/github/manosbatsis/corda5/testutils/rest/client/LoggingUtil.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
23 changes: 20 additions & 3 deletions
23
.../src/main/kotlin/com/github/manosbatsis/corda5/testutils/rest/client/model/FlowRequest.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,9 +1,26 @@ | ||
package com.github.manosbatsis.corda5.testutils.rest.client.model | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore | ||
import java.util.* | ||
|
||
data class FlowRequest( | ||
data class FlowRequest<T>( | ||
val clientRequestId: String = UUID.randomUUID().toString(), | ||
val flowClassName: String, | ||
val requestBody: Any? | ||
) | ||
val requestBody: Any?, | ||
@JsonIgnore | ||
val flowResultClass: Class<T>, | ||
) { | ||
constructor( | ||
clientRequestId: String = UUID.randomUUID().toString(), | ||
flowClass: Class<*>, | ||
requestBody: Any?, | ||
flowResultClass: Class<T>, | ||
) : this(clientRequestId, flowClass.canonicalName, requestBody, flowResultClass) | ||
|
||
fun <N> withFlowResultClass(other: Class<N>) = FlowRequest( | ||
clientRequestId = clientRequestId, | ||
flowClassName = flowClassName, | ||
requestBody = requestBody, | ||
flowResultClass = other | ||
) | ||
} |
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