package Ġorg . opense arch . rest . action Ċ Ċ import Ġorg . apache . logging . log 4 j . Log Manager Ċ import Ġorg . opense arch . client . node . Node Client Ċ import Ġorg . opense arch . rest . Base Rest Handler Ċ import Ġorg . opense arch . rest . Bytes Rest Response Ċ import Ġorg . opense arch . rest . Rest Handler Ċ import Ġorg . opense arch . rest . Rest Request Ċ import Ġorg . opense arch . search . fetch . sub phase . Fetch Source Context Ċ import Ġjava . util . Collections . unmodifiable List Ċ import Ġjava . util . Arrays . asList Ċ Ċ internal Ġclass ĠRest HelloWorld Action : ĠBase Rest Handler () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlogger New Ġ= ĠLog Manager . getLogger ( Rest HelloWorld Action :: class . java ) ĊĊĠĠĠ Ġoverride Ġfun ĠgetName (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ" rest _ handler _ hello _ world " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġroutes (): ĠMutable List < Rest Handler . Route > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġun modifiable List ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠlistOf ( Rest Handler . Route ( Rest Request . Method . GET , Ġ"/ _ plugins / hello _ world "), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRest Handler . Route ( Rest Request . Method . POST , Ġ"/ _ plugins / hello _ world "))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġprepare Request ( p 0 : ĠRest Request , Ġp 1 : ĠNode Client ): ĠRest Channel Consumer Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger New . info (" hello - world - plugin ") ĊĠĠĠĠĠĠĠ Ġvar Ġname : ĠString ? Ġ= Ġ"" ĊĠĠĠĠĠĠĠ Ġif Ġ( p 0 . has Content ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġp 0 . content Parser (). map Strings ()[" name "] ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġsrc Context Ġ= ĠFetch Source Context ( true , Ġnull , Ġnull ) ĊĠĠĠĠĠĠĠ Ġval Ġhandle HelloWorld Request Ġ= ĠHandle HelloWorld Request ( name , ĠRest Actions . parse Version ( p 0 ), Ġp 0 . method (), Ġsrc Context ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠRest Channel Consumer Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġchannel Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġp 1 . execute ( Handle HelloWorld Action . INSTANCE , Ġhandle HelloWorld Request , ĠRest To X Content Listener ( channel )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }