package Ġweb Ċ Ċ import ĠBOT _ PATH Ċ import ĠHE IK O _ PATH Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġhe iko . He iko Notification Bot Ċ import Ġorg . telegram . telegram bots . bots . Telegram Long Polling Bot Ċ import Ġorg . telegram . telegram bots . meta . api . objects . Update Ċ import Ġprint . Uni Print Bot Ċ import Ġjavax . servlet . annotation . Http Constraint Ċ import Ġjavax . servlet . annotation . Servlet Security Ċ import Ġjavax . servlet . annotation . Web Servlet Ċ import Ġjavax . servlet . http . HttpServlet Ċ import Ġjavax . servlet . http . HttpServletRequest Ċ import Ġjavax . servlet . http . HttpServletResponse Ċ Ċ abstract Ġclass ĠAbstract Webhook Controller ( private Ġval Ġbot : ĠTelegram Long Polling Bot ) Ġ: ĠHttpServlet () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġmapper Ġ= ĠObjectMapper () ĊĊĠĠĠ Ġoverride Ġfun Ġdo Post ( req : ĠHttpServletRequest , Ġresp : ĠHttpServletResponse ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġupdate Ġ= Ġmapper . readValue ( req . reader , ĠUpdate :: class . java ) ĊĠĠĠĠĠĠĠ Ġprintln ( update ) ĊĊĠĠĠĠĠĠĠ Ġbot . on Update Received ( update ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Web Servlet ("/ $ BOT _ PATH ") Ċ @ Servlet Security ( Http Constraint ( transport Gu arante e Ġ= ĠServlet Security . Transport Gu arante e . CONF IDENT IAL )) Ċ class ĠPrint Webhook Controller Ġ: ĠAbstract Webhook Controller ( Uni Print Bot ()) Ċ Ċ @ Web Servlet ("/ $ HE IK O _ PATH ") Ċ @ Servlet Security ( Http Constraint ( transport Gu arante e Ġ= ĠServlet Security . Transport Gu arante e . CONF IDENT IAL )) Ċ class ĠHe iko Webhook Controller Ġ: ĠAbstract Webhook Controller ( He iko Notification Bot ()) Ċ