package Ġcom . template . flows Ċ Ċ import Ġco . parallel universe . fib ers . Suspend able Ċ import Ġnet . cord a . core . flows .* Ċ import Ġnet . cord a . core . identity . Party Ċ import Ġnet . cord a . core . utilities . Progress Tracker Ċ import Ġnet . cord a . core . utilities . unwrap Ċ Ċ @ Initi ating Flow Ċ @ Start able By RPC Ċ class ĠPing ( private Ġval Ġcounter party : ĠParty ) Ġ: ĠFlow Logic < String >() Ġ{ ĊĠĠĠ Ġoverride Ġval Ġprogress Tracker Ġ= ĠProgress Tracker () ĊĊĠĠĠ Ġ@ Suspend able ĊĠĠĠ Ġoverride Ġfun Ġcall (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" Ping Ġcall Ġ... ") ĊĠĠĠĠĠĠĠ Ġval Ġcounter party Session Ġ= Ġinitiate Flow ( counter party ) ĊĠĠĠĠĠĠĠ Ġlogger . info (" Ping Ġinitiated Ġsession Ġwith Ġ${ counter party . name }") ĊĠĠĠĠĠĠĠ Ġlogger . info (" Ping Ġsend And Receive Ġ... ") ĊĠĠĠĠĠĠĠ Ġval Ġcounter party Data Ġ= Ġcounter party Session . send And Receive < String >(" ping ") ĊĠĠĠĠĠĠĠ Ġlogger . info (" Ping Ġreceived Ġresponse Ġfrom Ġsend And Receive () Ġ... ") ĊĠĠĠĠĠĠĠ Ġval Ġmsg Ġ= Ġcounter party Data . unwrap Ġ{ Ġit Ġ} ĊĠĠĠĠĠĠĠ Ġassert ( msg Ġ== Ġ" p ong ") ĊĠĠĠĠĠĠĠ Ġreturn Ġmsg ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Initi ated By ( Ping :: class ) Ċ class ĠP ong ( private Ġval Ġcounter party Session : ĠFlow Session ) Ġ: ĠFlow Logic < Unit >() Ġ{ ĊĠĠĠ Ġ@ Suspend able ĊĠĠĠ Ġoverride Ġfun Ġcall () Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" P ong Ġcall Ġ... ") ĊĠĠĠĠĠĠĠ Ġval Ġcounter party Data Ġ= Ġcounter party Session . receive < String >() ĊĠĠĠĠĠĠĠ Ġlogger . info (" P ong Ġreceived Ġresponse Ġfrom Ġ${ counter party Session . counter party . name }: Ġ${ counter party Data . unwrap { it }} ") ĊĠĠĠĠĠĠĠ Ġcounter party Data . unwrap Ġ{ Ġmsg Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert ( msg Ġ== Ġ" ping ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġlogger . info (" P ong Ġsending Ġresponse Ġto Ġ${ counter party Session . counter party . name }") ĊĠĠĠĠĠĠĠ Ġcounter party Session . send (" p ong ") ĊĠĠĠ Ġ} Ċ }