package Ġio . bar ine k . continu um . users Ċ Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġio . bar ine k . continu um . rest support . Basic Handler Ċ import Ġorg . eclipse . jetty . server . Request Ċ import Ġjava . util . Arrays . asList Ċ import Ġjavax . servlet . http . HttpServletRequest Ċ import Ġjavax . servlet . http . HttpServletResponse Ċ Ċ class ĠUser Controller ( val Ġmapper : ĠObjectMapper , Ġval Ġgateway : ĠUser Data Gateway ) Ġ: ĠBasic Handler () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġhandle ( s : ĠString , Ġrequest : ĠRequest , Ġhttp Servlet Request : ĠHttpServletRequest , Ġhttp Servlet Response : ĠHttpServletResponse ) Ġ{ ĊĠĠĠĠĠĠĠ Ġget ("/ users ", Ġas List (" application / json ", Ġ" application / vnd . app continu um . v 1 + json "), Ġrequest , Ġhttp Servlet Response ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval ĠuserId Ġ= Ġrequest . getParameter (" userId ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġrecord Ġ= Ġgateway . find Object By ( userId . to Long ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmapper . writeValue ( http Servlet Response . output Stream , ĠUserInfo ( record . id , Ġrecord . name , Ġ" user Ġinfo ")) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }