update comments

This commit is contained in:
mattbradburyr3 2023-03-21 10:35:34 +00:00
parent 7c1dde2e9d
commit 4451b7cfb0
6 changed files with 11 additions and 11 deletions

View File

@ -11,10 +11,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
// MyFirstFlow is an initiating flow, it's corresponding responder flow is called MyFirstFlowResponder (defined below) // MyFirstFlow is an initiating flow, its corresponding responder flow is called MyFirstFlowResponder (defined below)
// to link the two sides of the flow together they need to have the same protocol. // to link the two sides of the flow together they need to have the same protocol.
@InitiatingFlow(protocol = "my-first-flow") @InitiatingFlow(protocol = "my-first-flow")
// MyFirstFlow should inherit from ClientStartableFlow, which tells Corda it can be started via an RPC call // MyFirstFlow should inherit from ClientStartableFlow, which tells Corda it can be started via an REST call
public class MyFirstFlow implements ClientStartableFlow { public class MyFirstFlow implements ClientStartableFlow {
// Log messages from the flows for debugging. // Log messages from the flows for debugging.
@ -78,14 +78,14 @@ public class MyFirstFlow implements ClientStartableFlow {
// Receive a response from the responder flow. // Receive a response from the responder flow.
Message response = session.receive(Message.class); Message response = session.receive(Message.class);
// The return value of a RPCStartableFlow must always be a String. This will be passed // The return value of a ClientStartableFlow must always be a String. This will be passed
// back as the REST RPC response when the status of the flow is queried on Corda. // back as the REST response when the status of the flow is queried on Corda.
return response.getMessage(); return response.getMessage();
} }
} }
/* /*
RequestBody for triggering the flow via http-rpc: RequestBody for triggering the flow via REST:
{ {
"clientRequestId": "r1", "clientRequestId": "r1",
"flowClassName": "com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlow", "flowClassName": "com.r3.developers.csdetemplate.flowexample.workflows.MyFirstFlow",

View File

@ -29,9 +29,9 @@ public class MyFirstFlowResponder implements ResponderFlow {
// Responder flows are invoked when an initiating flow makes a call via a session set up with the virtual // Responder flows are invoked when an initiating flow makes a call via a session set up with the virtual
// node hosting the responder flow. When a responder flow is invoked its call() method is called. // node hosting the responder flow. When a responder flow is invoked its call() method is called.
// Call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait // call() methods must be marked as @Suspendable, this allows Corda to pause mid-execution to wait
// for a response from the other flows and services. // for a response from the other flows and services.
// The Call method has the flow session passed in as a parameter by Corda so the session is available to // The call() method has the flow session passed in as a parameter by Corda so the session is available to
// responder flow code, you don't need to inject the FlowMessaging service. // responder flow code, you don't need to inject the FlowMessaging service.
@Suspendable @Suspendable
@Override @Override

View File

@ -120,7 +120,7 @@ public class CreateNewChatFlow implements ClientStartableFlow {
} }
/* /*
RequestBody for triggering the flow via http-rpc: RequestBody for triggering the flow via REST:
{ {
"clientRequestId": "create-1", "clientRequestId": "create-1",
"flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.CreateNewChatFlow", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.CreateNewChatFlow",

View File

@ -106,7 +106,7 @@ public class GetChatFlow implements ClientStartableFlow {
} }
/* /*
RequestBody for triggering the flow via http-rpc: RequestBody for triggering the flow via REST:
{ {
"clientRequestId": "get-1", "clientRequestId": "get-1",
"flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow",

View File

@ -49,7 +49,7 @@ public class ListChatsFlow implements ClientStartableFlow {
} }
/* /*
RequestBody for triggering the flow via http-rpc: RequestBody for triggering the flow via REST:
{ {
"clientRequestId": "list-1", "clientRequestId": "list-1",
"flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow",

View File

@ -108,7 +108,7 @@ public class UpdateChatFlow implements ClientStartableFlow {
} }
/* /*
RequestBody for triggering the flow via http-rpc: RequestBody for triggering the flow via REST:
{ {
"clientRequestId": "update-1", "clientRequestId": "update-1",
"flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", "flowClassName": "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow",