/* Ċ Ġ* ĠCopyright Ġ 2 0 2 1 ĠLINE ĠCorporation Ċ Ġ* Ċ Ġ* ĠLINE ĠCorporation Ġlicenses Ġthis Ġfile Ġto Ġyou Ġunder Ġthe ĠApache ĠLicense , Ċ Ġ* Ġversion Ġ 2 . 0 Ġ( the Ġ" License "); Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ċ Ġ* Ġwith Ġthe ĠLicense . ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat : Ċ Ġ* Ċ Ġ* ĠĠ Ġhttps :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , ĠWITHOUT Ċ Ġ* ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . ĠSee Ġthe Ċ Ġ* ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ġlimitations Ċ Ġ* Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcom . line corp . ar mer ia . internal . common . kotlin Ċ Ċ import Ġcom . line corp . ar mer ia . common . util . Safe Closeable Ċ import Ġcom . line corp . ar mer ia . server . Service RequestContext Ċ import Ġkotlinx . coroutines . Thread Context Element Ċ import Ġkotlin . coroutines . Abstract Coroutine Context Element Ċ import Ġkotlin . coroutines . Coroutine Context Ċ Ċ /** Ċ Ġ* ĠPro pag ates Ġ[ Service RequestContext ] Ġover Ġcor outines . Ċ Ġ*/ Ċ class ĠAr mer ia Request Coroutine Context ( ĊĠĠĠ Ġprivate Ġval Ġrequest Context : ĠService RequestContext Ċ ) Ġ: ĠThread Context Element < Safe Closeable >, ĠAbstract Coroutine Context Element ( Key ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject ĠKey Ġ: ĠCor outine Context . Key < Ar mer ia Request Coroutine Context > ĊĊĠĠĠ Ġoverride Ġfun Ġupdate Thread Context ( context : ĠCor outine Context ): ĠSafe Closeable Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrequest Context . push () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġrestore Thread Context ( context : ĠCor outine Context , Ġold State : ĠSafe Closeable ) Ġ{ ĊĠĠĠĠĠĠĠ Ġold State . close () ĊĠĠĠ Ġ} Ċ } Ċ